[Datetime-SIG] Calendar vs timespan calculations...

Tim Peters tim.peters at gmail.com
Mon Aug 3 22:25:49 CEST 2015


[Ethan Furman]
> I don't know whether we should add support for leap-seconds to the new
> strict tzinfo, but I will mention that the proposal to get rid of them keeps
> being postponed,

But that won't last forever.  If nothing changes, the frequency of
leap second adjustments will eventually become unbearable, falling
from today's "about once per 18 months" through "about once per year"
through "about once per month" through "about once per day" ... and
even now, the longer change is delayed, the more countries have
decided to support the proposal(s) to abolish leap seconds.  That
multiple US government agencies support the change now is a Big Deal.
Russia continuing to oppose it also a Big Deal.  Nothing a nuclear war
couldn't sort out ;-)


> and leap seconds are actively harming the business community precisely because
> they are not being accounted for.

Eh.  The reason Google's "smear" works so well is precisely because it
hides the existence of leap seconds entirely from billions of lines of
code:

- No code ever sees a repeated second.
- No code ever sees a missing second.
- No code ever sees a second outside of [0, 1, 2, ..., 59].

In return, code _does_ sometimes see that one second isn't the same
duration as the next second, but the difference is small enough from
second to second that almost no code cares one whit about that.  Code
that does care is highly exceptional, has always had to worry about
tons of obscure stuff, and is maintained by domain experts paid well
to deal with it all.

Alas, to be so effective, that has to be implemented inside the OS, so
that almost all ways of asking "what time is it now?" are equally
oblivious to leap seconds.


More information about the Datetime-SIG mailing list