Subject: Re: The 2005 leap second is not recognised by NetBSD 3.0?
To: Rhialto <>
From: Jonathan A. Kollasch <>
List: current-users
Date: 12/31/2005 13:10:49
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Dec 31, 2005 at 02:41:12PM +0100, Rhialto wrote:
> Well, adjusting for time zone, I still don't get an expected result:
> $ export TZ=3DUTC
> $ date -r 1136073599; date -r 1136073600
> Sat Dec 31 23:59:59 UTC 2005
> Sun Jan  1 00:00:00 UTC 2006
> Where is Sat Dec 31 23:59:60 UTC 2005, as promised in
> src/share/zoneinfo/leapseconds?

It's mandated by POSIX that we *NOT* recognize leap seconds, it's
up to ntpd to *break* the clock's monotonicity.

You can work around this by using zoneinfo files compiled with leap
second support, and setting clock to the TAI value of unix time.
Read src/share/zoneinfo/Makefile w/ regards to the REDO variable.
However this will break things that assume time(3) to have the POSIX
value of time (currently 22 seconds different, soon 23).
rdate and ntpd break with this numbering system.  In short POSIX is
badly broken.

Read the Wikipedia article on Unix_time. See also and=20

Quite simply the leap seconds don't exist in POSIX chronology.

	Jonathan Kollasch

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.2 (NetBSD)