AbsoluteTime with an integer argument behaves strangely.

Posted by dreeves on Stack Overflow See other posts from Stack Overflow or by dreeves
Published on 2010-06-13T23:48:24Z Indexed on 2010/06/13 23:52 UTC
Read the original article Hit count: 174

Filed under:
|
|

This is strange:

DateList@AbsoluteTime[596523]

returns

{2078, 7, 2, 2, 42, 9.7849}

But

DateList@AbsoluteTime[596524]

returns

{1942, 5, 26, 20, 28, 39.5596}

The question: What's going on? Note that AbsoluteTime with an integer argument is undocumented.

(I think I now know what it's doing but figured this is useful to have as a StackOverflow question for future reference; and I'm curious if there's some reason for that magic 596523 number.)

© Stack Overflow or respective owner

Related posts about debugging

Related posts about datetime