[tz] Question about leap seconds

random832 at fastmail.us random832 at fastmail.us
Wed Sep 11 16:34:42 UTC 2013

On Wed, Sep 11, 2013, at 12:18, Steve Allen wrote:
> Adding to that, the term UTC is polysemic in the context of computer
> timekeeping.  I urge anyone using the term UTC to be explicit about
> whether the intended meaning is UTC[ITU-R] (has leap seconds) or
> UTC[POSIX] (no leap seconds).  This may help avoid misunderstandings.

There is no such thing as UTC[POSIX] as you define it. POSIX timestamps
are an incomplete mapping of integers to UTC[ITU-R]. There also exists
the theoretical possibility of an integer that represents an invalid
UTC[ITU-R] timestamp ending in 23:59:59 where UTC[ITU-R] itself advances
from 23:59:58 to 00:00:00, but it remains theoretical as there have been
no actual negative leap seconds.

To say that "UTC[POSIX]" has "no leap seconds" is to imply it has ever
in fact differed from UTC[ITU-R] by more than one second. If such a
thing as "UTC[POSIX]" exists at all, it merely labels leap seconds
differently, in the same way that a timezone with daylight saving may
label two different moments as "02:30:00".

The fact that POSIX difftime() may return a value somewhat smaller than
the actual number of seconds that passed between the two timestamps
passed to it does not change this.

More information about the tz mailing list