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

Home » Public Forums » archive » Leap Seconds and JULDAY()
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Leap Seconds and JULDAY() [message #91399] Wed, 08 July 2015 15:23 Go to next message
MarioIncandenza is currently offline  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 Go to previous messageGo to next message
Craig Markwardt is currently offline  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
Re: Leap Seconds and JULDAY() [message #91404 is a reply to message #91399] Thu, 09 July 2015 08:47 Go to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Could this be related to the one-second adjustment that is occasionally applied in order to keep its time of day close to the mean solar time?

https://en.wikipedia.org/wiki/Leap_second

We had this adjustment 9 times since 1993 and the last one was last week!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Plotting one point per loop
Next Topic: RETURNING VALUES FROM FUNCTIONS

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

Current Time: Wed Oct 08 15:16:53 PDT 2025

Total time taken to generate the page: 0.07138 seconds