FUNCTION eis_tai2op , tai , date_only = date_only

utc       = tai2utc(tai , /EXTERNAL)


year   = STRING(format='(I04)',utc.year   )
month  = STRING(format='(I02)',utc.month  )
day    = STRING(format='(I02)',utc.day    )
hour   = STRING(format='(I02)',utc.hour   )
minute = STRING(format='(I02)',utc.minute )
second = STRING(format='(I02)',utc.second )


date = STRJOIN([year , month  , day   ] , /SINGLE)
time = STRJOIN([hour , minute , second] , /SINGLE)

IF (KEYWORD_SET(date_only) EQ 1) THEN RETURN , date


RETURN , STRJOIN([date,time] , '  ' , /SINGLE)

END
