I've written a few functions over the years. Maybe they'll help.
These two convert between utc seconds and julian (where julian includes a fractional part).
def fn%utcsectojul(local secs)=jul(1970,1,1)+(secs-tcb(44))/86400
def fn%jultoutcsec(local dtm)=(dtm-jul(1970,1,1))*86400+tcb(44)
These two produce text versions of a given date/time julian in universal or local time.
def fn%utctime$(local dtm)
let dtm+=tcb(44)/86400
return dte(int(dtm),24*fpt(dtm):"%Ds, %D %Ms %Yl %Hz:%mz:%sz +0000")
end def
def fn%localtime$(local dtm)
local time
return dte(int(dtm),24*fpt(dtm):"%Ds, %D %Ms %Yl %Hz:%mz:%sz")+" "+str(-tcb(44)/3600:"+00")+str(60*fpt(-tcb(44)/3600):"00")
end def