comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Seconds to UTC date
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Seconds to UTC date [message #49619] Sat, 05 August 2006 19:14
Mike Wallace is currently offline  Mike Wallace
Messages: 25
Registered: May 2006
Junior Member
There's probably a cleaner solution out there, but here's something that
may get you on the right track.


; seconds and milliseconds portions of the time to convert
seconds = 100000000
millis = 123

; convert the seconds to a julian day
ts = bin_date(systime(0, seconds, /UTC)
jd = julday(ts[1], ts[2], ts[0], ts[3], ts[4], ts[5])

; add the milliseconds fraction to the JD
jd += millis / 86400000.0

; display the JD values
fmt = '(C(CDI, X, CMoA, X, CYI, X, CHI2.2, ":", CMI2.2, ":", CSF6.3))'
print, jd, FORMAT = fmt


Running this little test program displays...
3 Mar 1973 09:46:40.123



-Mike
[Message index]
 
Read Message
Previous Topic: Seconds to UTC date
Next Topic: Re: More OO jargon

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:58:27 PDT 2025

Total time taken to generate the page: 0.00421 seconds