[LEAPSECS] LEAPSECS Digest, Vol 45, Issue 1

M. Warner Losh imp at bsdimp.com
Fri Sep 3 12:23:56 EDT 2010


In message: <20100903160248.GA16778 at lake.fysh.org>
Zefram <zefram at fysh.org> writes:

: Ian Batten wrote:

: >I have a dim memory, based on wrestling with one of the *BSD's NTP

: >implementation in the mid 1990s, that one Unix decided to tick TAI

: >rather than UTC and move leap-seconds into userspace. But it's all very

: >dim...

:

: The Olson timezone database has some support for this. It has a listing

: of leap seconds, which can be included into tzfiles. The zoneinfo-right

: directory has this version of the tzfiles, whereas the zoneinfo-posix

: directory has tzfiles that do not mention leap seconds.


The code that implements these tables just reads them in once at
startup, which means programs running longer than 6 months may have
have the wrong values... Of course, this is also true if the code is
running over a time zone change too...


: A wrinkle is the divergence of TAI and UTC prior to 1972, which cannot

: be properly modelled using leap seconds. I understand that, as a

: result, the time_t in these systems actually depicts TAI-10s, not TAI.

: These time_t values coincide with the UTC-based POSIX time_t values for

: the first half of 1972, and in 2010 the two time_t values differ by 24.

: I've never seen such a system in operation, though, so I can't confirm

: that it works this way.


The tricky bit is keeping the tables up to date, and convincing the
kernel to do the right thing over leap seconds (which in this case is
nothing). Also, there are hacks needed for ntp...

Such a system can be made to work, but there's a number of hurdles to
making it go 100%.

Warner


More information about the LEAPSECS mailing list