back

by jader201·1y ago·view on hn ↗
Related:

https://en.wikipedia.org/wiki/Leap_second

It seems like there's not much agreement on what to do about -- or whether to even use -- leap seconds.

Sounds like a fairly complex problem to solve, given such a relatively miniscule amount of time -- possibly even tougher than solving leap year and/or time zones/DST.

1 comments
A thought I've had is we should ignore leap seconds until the difference between UTC and timezone reference times (e.g. mean midnight at the Greenwich meridian) reaches some significant threshold, e.g. 5 minutes. At this point, all timezones worldwide should perform a coordinated shift by the threshold amount - so Europe/London moves from UTC+0000 to UTC+0005, Eastern Standard Time moves from UTC-0500 to UTC-0455, etc... and stay there until the difference reaches the threshold again (one way or another). We should get at least a couple of decades of forewarning if such a shift is likely to be needed, which should be enough to plan for and test the first migration.

Whether this co-ordination involves everyone switching at the exact same instant, or each timezone switching at e.g. 01:30 in that timezone, is left as an exercise for the reader.

Also... it pushes the first change far enough in the future that the people designing the rules likely won't have to worry about having to implement them. Which might make it easier to agree on them ;-)

> We should get at least a couple of decades of forewarning if such a shift is likely to be needed, which should be enough to plan for and test the first migration.

A migration that only happens every couple of decades is guaranteed to be one we never get good at, and flub every time.

> A migration that only happens every couple of decades is guaranteed to be one we never get good at, and flub every time.

Related: we have leap years regularly, and yet people flub February 29 regardless of the predictable occurrences.

I hadn't thought about that, but I'd actually like to see if it's better to do the opposite. Insert half a leap second twice as frequently as we currently do with a leap second. If that's successful, switch to inserting a quarter leap second and so on, maybe until we get to a state where we adjust a tiny fraction of a leap second on a daily basis. The point is that even if you have a system screw up time adjustment 1 day, it's such a small time error that shouldn't affect anything, and people can immediately work on fixing it.

And actually, what you explained about waiting until some significant threshold like 5 minutes is already something we do today in a way. It's just that we wait years and our threshold is 1 second before we actually make a change.

I don't think the threshhold is that significant. The main difference I'd like to see is that we apply the change to timezones, not to the underlying "count number of seconds" clock. But I think timezones aren't able to be specified to sub-minute precision, so 5 minutes is just as good as 1 minute.
This, although we don't even need to agree to do anything (just agree to so nothing before some threshold).

Setting timezones is inherently political, so politicians are free to decide what to do when (as long as we can agree that shifting timezones a second at a time is silly).

When the time comes they may even decide to do nothing at all, or delay things until 15 min have passed, or who cares…