[LEAPSECS] Toasting Unix timestamp 1234567890

Zefram zefram at fysh.org
Sat Feb 14 12:57:34 EST 2009


Magnus Danielson wrote:

>Indeed. This is useful for those believing in SI/TAI seconds for as the

>second distance of time_t, their reference epoch is inconveniently

>offset in this fashion, making them have an offset of 25,999918 s from

>POSIX (right now - propper reference scale should be TAI).


Yes.


>Those believing in rubber seconds up to 1972 and then SI/TAI seconds

>from that will get the more convenient 10 s offset from 1 Jan 1972,

>making them having an offset of 24 s from POSIX.


No, if you're doing this then you must include the irregular leap. The
current offset is about 24.107757997 s, and does not have a terminating
decimal representation. (This is the counting-UTC-seconds way.)

I believe some people do do the 24 s offset that you suggest, however.
I think it's through ignorance of the rubber-seconds era and its leaps.
These people are effectively using an epoch of 1972-01-01T00:00:00 UTC
= 63072000. There's no clean description of what they're counting since
1970. If doing this then it seems more consistent for pre-1972 timestamps
to count back in TAI seconds, but in practice I think a vague-UT pre-1972
timescale gets grafted onto the TAI-synched post-1972 timescale. Bit of
a mess.


>1234567890 seconds of time_t makes no sense at the time that time_t

>reads 1234567890 since it is not the number of seconds from the

>reference epoch, it is a form of "mock seconds" to make the scales fit.


Yes. This is sometimes succinctly described as counting "non-leap
seconds since the epoch".

-zefram


More information about the LEAPSECS mailing list