UTC questionnaire

D. J. Bernstein djb at cr.yp.to
Sat Dec 4 01:12:56 UTC 1999

1. Do I correctly understand that, under this proposal, IERS expects the
civil authorities to change the local time zone every few thousand years
so that the sun is roughly overhead at 12:00? (Assuming, of course, that
the world keeps using local time long enough for this to be an issue.)

2. To correct some information you've received about UNIX: UNIX does not
keep track of time in UTC. UNIX keeps track of time as an integer (plus,
in some cases, a 6-digit or 9-digit fractional part) that counts seconds.
The bulk of UNIX time-handling software simply adds or subtracts these
integers to schedule or measure real-time events.

The popular Olson tz library in ``right'' mode interprets the counter as
the number of TAI seconds since 1970-01-01 00:00:10 TAI, and converts it
to local time for human display, taking account of leap seconds. It can
also convert from local time back to the counter. Many applications call
this library.

Unfortunately, previous time libraries didn't understand leap seconds---
UNIX predates leap seconds!---and this mistake was codified in the POSIX
standard, along with an incorrect leap-year rule. There are still some
programs that produce silly results during leap seconds. But they'll be
fixed eventually.

3. The tz library won't work past 2038. I've been writing a new library
intended to work until the Gregorian calendar is replaced. This code
will, of course, be easier to write correctly if there are no more leap


More information about the tz mailing list