Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Wed Jan 26 16:04:54 EST 2005

Peter Simons <simons at cryp.to> writes:

>  > The computers timer should not attempt to adjust for leap
>  > seconds...
> I seem to recall reading somewhere that leap second inserts
> are supposed to be represented as:
>   23:59:59
>   23:59:60
>   00:00:00

Yes, but Unix API doesn't use this. The OS communicates in terms
of UTC seconds since the epoch (and microseconds / nanoseconds).
Userspace translates between this and broken-down time (year, month
etc.), and UTC doesn't have leap seconds. Userspace also takes
timezones into account - the kernel reports UTC only.

I don't know how it looks on other systems.

On Linux it is possible to set timezones which assume that the system
time is TAI instead of UTC, and translate it to UTC. In this case the
local time can have tm_sec == 60. It breaks programs which rely on
POSIX rules and perform the conversion themselves. I don't know how
NTP clients handle this, and how many people actually use it in
practice (it's not a default).

   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/

More information about the Libraries mailing list