Leap Seconds and JULDAY() [message #91399] |
Wed, 08 July 2015 15:23  |
MarioIncandenza
Messages: 231 Registered: February 2005
|
Senior Member |
|
|
Hello IDL wizards!
I have data timestamped with "seconds-since-epoch," in this case the epoch is 1/1/1993 00:00.
My results had been 8 seconds off, which I never noticed, but then last week, I started to have problems, and found my results were 9 seconds off.
My method is this:
EPOCH=JULDAY(1,1,1993,0,0,0)
SECONDS_IN_A_DAY = DOUBLE(24l*60*60)
TIMESTAMP_UTC = EPOCH + (EPOCH_SECONDS/SECONDS_IN_A_DAY)
This gives the wrong answer, because JULDAY() doesn't have epoch seconds. This makes me sad, though there may be some detailed reason why it shouldn't.
--Edward H.
|
|
|
Re: Leap Seconds and JULDAY() [message #91400 is a reply to message #91399] |
Wed, 08 July 2015 16:35   |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On Wednesday, July 8, 2015 at 6:23:36 PM UTC-4, Edward Hyer wrote:
> Hello IDL wizards!
>
> I have data timestamped with "seconds-since-epoch," in this case the epoch is 1/1/1993 00:00.
>
> My results had been 8 seconds off, which I never noticed, but then last week, I started to have problems, and found my results were 9 seconds off.
>
> My method is this:
>
> EPOCH=JULDAY(1,1,1993,0,0,0)
> SECONDS_IN_A_DAY = DOUBLE(24l*60*60)
> TIMESTAMP_UTC = EPOCH + (EPOCH_SECONDS/SECONDS_IN_A_DAY)
>
> This gives the wrong answer, because JULDAY() doesn't have epoch seconds. This makes me sad, though there may be some detailed reason why it shouldn't.
So what is your question? Sadness is a state of being. :-)
But maybe you want to try my TAI_UTC() function?
Craig
|
|
|
|