Re: Seeking clarifaction of tai64nlocal and leap seconds

Brian Reichert <[email protected]> Wed, 19 Sep 2012 17:20:07 -0400
Newsgroups gmane.comp.djb.syslog
Message-ID <[email protected]>
On Wed, Sep 19, 2012 at 02:28:12PM -0700, Russ Allbery wrote:
> Doesn't that mean that it's (somewhat blindly) assuming that there have
> been 10 leap seconds since epoch, and will start generating incorrect
> timestamps as further leap seconds are added?

Maybe leap seconds only enter into it when you're converting from
TAI to something human-readable.

From the tai64nlocal webpage/manpage:

       Beware, however, that the current implementation of tai64nlocal
       relies on the UNIX localtime library routine to find the
       local time.  Some localtime implementations use a broken
       time scale that does not account for leap seconds. On systems
       that use the Olson tz library (with an up- to-date leap-second
       table), you can fix this problem by setting your time zone
       to, e.g, right/US/Pacific instead of US/Pacific.

My Linux distribution indeed has both sets of zone files.  (Java
does not.)

  http://www.oracle.com/technetwork/java/javase/timezones-137583.html#olson

> -- 
> Russ Allbery ([email protected])             <http://www.eyrie.org/~eagle/>

-- 
Brian Reichert				<[email protected]>
BSD admin/developer at large