FreeBSD Support for Leap Seconds
freebsd.org
freebsd.org
If people still care about solar noon matching civil noon 4000 years from now they simply need shift the timezones by an hour. This is a much safer and more reasonable change which could be planned a hundred years in advance and wouldnt require a constant feed of unpredictable "trusted" leap seconds. Systems already handle mixed timezones well and will continue to do so since computers exist worldwide.
As more distributed systems become sensitive to second-scale timing and the cost of reliable oscillators that can keep time autonomously continues to decline the cost of leap-seconds will continue to increase; but the value they provide (primarily political bragging rights about Greenwich being part of the definition of civil time) will remain at practically zero for almost everyone.
Workarounds like leap-smear are just that-- workarounds, and add more possible failure modes to leap-second handling and will cause different failure modes for applications that care about time in different ways, e.g. caring about frequency vs time; or just from having even more ways to handle the leap second.
Moreover, the discontinuation of leapseconds is simple and nearly costless. Announce that no more will be issued; then don't issue anymore of them.
The problem is not everyone uses NTP, and not everyone has network connectivity. So we have to support folks inputting the time manually. Trying to go from that backwards to TAI (possibly with an incomplete/nonexistent table of leap seconds) makes for some rather messy logic.
This seems like a feature for no one, as the people who really care about leap seconds are probably doing their own timekeeping already since computer clocks aren't exactly accurate to being with.
1. Time is never the same on two different computers.
2. Time is different when you send it and receive it (speed of light).
3. Time isn't necessarily linear (time dilation).
4. Clocks drift, even with NTP.
5. Some systems are isolated enough to accept inaccurate human input and time synchronisation.
Time is an invention for human consumption mainly. Machines are better served with explicit synchronisation (paxos, distributed transactions) or not at all (eventual consistency). Examples in brackets.
Time, if we lose a few seconds here and there, meh, don't sweat it.
Using atomic clocks to sync distributed systems is actually done in practice.
http://static.googleusercontent.com/media/research.google.co...
Even relatively reliable frequency/time standards (HP/Agilent come to mind) aren't 100% available.
My ideal time system would have 13 months, with 12 30 days months plus 1 end of the year month with either 5 or 6 days (plus an occasional leap second). An no damn daylight savings time. Of course, it would make a lot of sense to put the beginning of the year at the beginning of the first month of spring, not the _second_ month of winter. But again, nothing about modern calendar makes much sense. You begin to realize how insane it is only when you are forced to write a time library from scratch in C++ as part of a C++ course. I did that in high school, and it was really eye opening.
http://datacenter.iers.org/eop/-/somos/5Rgv/getTX/16/bulleti...
"Leap seconds can be introduced in UTC at the end of the months of December or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every six months, either to announce a time step in UTC or to confirm that there will be no time step at the next possible date."
(That said, saving them up until the next Leap Year would mean a maximum discovery-to-implementation interval of 8 years, rather than the current 1 year max.)
If you can get the smear to be gentle enough to not affect your apps, it's a nice workaround for the general problem. There's just so many components running inside a modern infrastructure, and it's hard to get them all to behave correctly during a traditional 61-second-minute leap second transition.
And that 2012 leap second linux kernel bug was pretty epic. AFAIK, people who are smearing didn't experience it.
http://googleblog.blogspot.com/2011/09/time-technology-and-l...
The amount of stuff that still runs an older Linux kernel is insane...
Such precison is well outside the realm of NTP but is not really a problem for PTP. I've worked on Linux systems that have done this; ~100ns synchronization was not uncommmon.
(PTP, incidentally, got it right and specifies that its timescale is based on TAI, so it is continuous.)
For example, AWS does this for their management console: https://aws.amazon.com/blogs/aws/look-before-you-leap-the-co...
Google also does something similar: http://googleblog.blogspot.com/2011/09/time-technology-and-l...