[LEAPSECS] [time-nuts] Leap Quirks

Zefram zefram at fysh.org
Mon Jan 5 05:24:53 EST 2009


M. Warner Losh wrote:

>So time_t is effectively defined in POSIX to be:

>

> d * 86400 + min(tod(x), 86399)

>

>where d is the number of days since 01-01-1970, and tod is the second

>since midnight within the day.


Actually it's simpler than that. The expression given by POSIX amounts to

d * 86400 + tod(x)

so a leap second appears identical to the first second of the next day,
rather than a repeat of the previous second. What's actually implemented
by particular kernels varies; Linux, for example, does something in
between these, jumping backwards (by 1) a few milliseconds after the
start of the leap second.

-zefram


More information about the LEAPSECS mailing list