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

Home » Public Forums » archive » Re: Time convertion
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: Time convertion [message #24222 is a reply to message #24126] Wed, 14 March 2001 11:52 Go to previous messageGo to previous message
tam is currently offline  tam
Messages: 48
Registered: February 2000
Member
JD Smith wrote:
... In any case,
> it is oh so trivial to convert date to systime, the inverse:
>
> st=(julday(month,day,year,hr,min,sec)-2440587.5D)*86400.0D
>
> That's it! For instance:
>
> IDL> st0=systime(0) & st1=systime(1)
> IDL> d=bin_date(st0)
> IDL> st=(julday(d[1],d[2],d[0],d[3],d[4],d[5])-2440587.5D)*86400. 0D
> IDL> print,FORMAT='(A,":",2D30.5)',st0,st1,st
>
...
>
> JD

How are leap seconds accounted for here? They usually cause
niggling problems if one actually needs to worry about
precision at the second level over periods of more than a
month or two. It looks like your code is ignoring them.
The biggest pain is that they are not predictable so the
code needs to access an external file, or update an
internal table periodically.

Regards,
Tom McGlynn
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: AD&D site / sito AD&D
Next Topic: Time convertion

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

Current Time: Wed Oct 08 17:46:49 PDT 2025

Total time taken to generate the page: 0.00530 seconds