[LEAPSECS] private smear goes public

Steve Summit scs+ls at eskimo.com
Fri Dec 2 11:16:53 EST 2016


Brooks Harris wrote:
> On 2016-12-02 12:57 AM, Warner Losh wrote:
> > They aren't regular... There's no formula to look up, no regular rule.
> > There's no math that will save you... they are irregular and there's
> > no standard way to get the leap second info reliably
>
> Oh yes. This seems like an obvious missing link to me. Its been 
> discussed here many times.

The other huge, huge difference (also discussed many times)
is that leap years are handled, while leap seconds are *not*
handled, by the popular computer time representations that
we use.  Almost no one who does date and time arithmetic on
computers ever even worries about leap years, because almost
everyone converts to a Posix time_t value, does their math in
seconds, and converts back to a human-readable form at the end.
But of course it's those same Posix time_t values that deny the
existence of leap seconds, such that many programmers mistakenly
imagine that it's impossible for computers to handle leap seconds
at all, because they don't imagine there's a way of doing date
and time arithmetic that isn't defined by seconds since the epoch.

It's possible to devise data structures that do represent UTC
properly, and that support data and time arithmetic reasonably
well, but they're a hard sell in the face of the convenience,
popularity, installed base, and Posix standardization of time_t.

(I wish this weren't so.  I'm trying to build such a
representation into the Linux kernel, and for months have thought
I was *this close* to having it working well enough to announce
here, but there still seem to be a few more kinks to work out...)

--scs


More information about the LEAPSECS mailing list