[LEAPSECS] operational time -- What's in a name?

M. Warner Losh imp at bsdimp.com
Fri Mar 28 16:22:22 EDT 2008


In message: <20080328201301.GA20923 at cox.net>
Greg Hennessy <greg.hennessy at cox.net> writes:

: > Well, time_t is UTC, which two unfortunate problems.

:

: Is it? I always thought it was a count of the number of seconds since

: the start of the unix epoch, not counting leap seconds.

:

: There having been 24 (I think) leap seconds since 1970, the unix

: epoch, if POSIX is UTC, then it can't be true that time_d % 86400 == 0

: is midnight.


Why not? You didn't read the rest of my post. It would be true only
if time_t were a uniform radix notation (which is a fancy way of
saying it mapped all seconds 1-1 and onto the number). It doesn't.
It maps some seconds onto the same value, keeping the above property.
How is that any different than the ITU defining UTC to generally
behave as time has behaved for centuries, except that leap seconds
have a new notation (the :60 stuff)? They essentially changed the
definition of a broken down time from the centuries old uniform radix
to one with a non-uniform radix. Time_t can be viewed in a similar
manner. If you insist that time_t be monotonic and a 1-1 onto
mapping, then you are correct. However, it is neither of those
things...

Again, it is a pain no matter what you do with leap seconds.

Warner



More information about the LEAPSECS mailing list