- - - - - --------------------------------------------- - - - - - C I R C U M L U N A R T R A N S M I S S I O N S - - - ------------------------------------------------------- - - - Issue One May 2021 ==============[ What's the Deal with Leap Seconds? ]=============== ================[ A Brief Overview of Timescales ]================= by solderpunk ASTRONOMICAL SECONDS Why is a second as long as it is, and not a little shorter or a little longer? This is a seemingly simple question which leads down a deep and delightfully twisted rabbit hole. It's something that I wish Neal Stephenson had written an epically long, inexplicably compelling 1990s Wired article about, in the spirit of his "Mother Earth, Mother Board" or "In the Kingdom of Mao Bell". But he didn't, so you're stuck reading this, instead: a brief, incomplete, possibly slightly inaccurate overview based on my own characteristically obsessive reading on the topic over the past week or so. For most of the time that the concept of the second has been around, its length has been defined implicitly by that of the day. Everybody knows the answer to "why is a day as long as it is?" - one day is the time it takes the Earth to complete a single revolution about its axis. And since there are 60 seconds in a minute, 60 minutes in an hour and 24 hours in a day, a second is simply one 86,400th of the time it takes the Earth to rotate once. Or, if you like, a second is the time it takes for the Earth to rotate one 240th of a degree, out of the full 360. End of story, right? Well, no. This is a perfectly sensible way to define time - for some applications, it's the best way to do it. This astronomically defined time scale is still in use today in certain contexts. The official name of its modern incarnation is Universal Time, or UT (technically, there are a few subtly different variants, denoted UT0, UT1 and UT2, but we'll gloss over that here). The official determination of UT nowadays is based mostly on measurements made at observatories tracking the movement of distant radio sources across the sky as the Earth rotates. This is easier than making precision measurements of the sun, but is still measuring the exact same thing. EARTH IS A NICE PLACE TO LIVE, BUT IT'S NOT THE BEST CLOCK The problem with an astronomical definition of the second is this: the Earth doesn't actually rotate at a perfectly constant rate (it wasn't until the 19th century that we could build clocks accurate enough to notice this). In fact, the Earth's rotation is slowing down. Very slowly, of course. Every century, a complete rotation takes about 2 milliseconds longer than it used to. The rate of slowing down is not steady. Some years the change is more and other years it's less. In fact, even though the overall trend is one of slowing down, some years the rotation actually speeds up. The dynamics of the process are complicated, and we can't make accurate long term forecasts. Gravitational interaction between the Earth and the moon is the primary driver, but the movement of tectonic plates and friction between Earth's surface and its atmosphere and oceans have their say, too. The Indian Ocean Earthquake in 2004 was powerful enough to shorten the length of a day by 2.68 microseconds. There are even periodic variations in the rate of rotation that we just don't understand the cause of yet. But the take home message is that, whatever the causes, astronomical seconds actually have small, random fluctuations in their duration over long time spans. If you define the second by looking into the skies, no two seconds are exactly the same. That's a pretty inconvenient property for the official definition of a fundamentally important unit like the second to have. For most of the time this definition was used, the fluctuations were smaller than we could reliably measure. Certainly, they weren't enough to have an impact on everyday life. Nobody was going to be late to lunch because of the Earth's unsteady rotation. But by the 20th century, scientific and technological progress meant these tiny fluctuations started to matter, as we began measuring natural phenomena and building machines which operated on very small time scales. A 10 megahertz radio oscillator, for example, has a period of 0.0000001 seconds - only 100 nanoseconds! Gigahertz radiation, which is important in radio astronomy and was used for communications and radar during WWII decades before it came to underpin modern technology like GPS, WiFi, and mobile data networks, has periods measured in *picoseconds*. Even very, very small variations in the length of a second are enough to make the measured frequency of radio waves change, even if the *actual* frequency is fixed. Modern technological society simply couldn't be built using a wobbly clock like the Earth. ATOMIC SECONDS Fortunately, in the 1950s, atomic clocks were invented which kept time better than any previous mechanism. I'll gloss right over the details, but suffice it to say, we came up with a new way to define the second which involved measuring the properties of caesium atoms instead of looking at things moving through the sky. In 1967, the relatively young International System (or SI, for the French "Système International") of units redefined the second on this basis. The new atomic second was defined such that it had the same length as the astronomical second in use before it, as far as measurements at the time could tell, but it had the added bonus that the length of the second was then fixed and unchanging. Caesium atoms at a given temperature "vibrate" (very loosely speaking) at a frequency which, as far as we can tell, is completely and perfectly stable, and which can be measured very accurately in a sufficiently advanced laboratory. With the arrival of atomic seconds, a new time scale was also defined: International Atomic Time (or TAI, for the French "Temps Atomique International"). At midnight on January 1st in 1958, TAI and UT were perfectly synchronised. Ever since then, they have slowly but surely drifted apart. The seconds of TAI are of perfectly unchanging length (as measured by averaging hundreds of atomic clocks all over the world), but the seconds of UT fluctuate with the Earth's rotation. The accumulated drift up until now is a little less than 40 seconds, but it will continue to grow, without limit. And while the perfectly uniform seconds of TAI make it the perfect tool for some tasks, this drift apart from UT makes it problematic for others. If you go outside at noon UT in Greenwich, England (or anywhere else at 0 degrees longitude), the sun will *always* be high in the sky. This is true today and it will be true in a thousand years, Because UT is fundamentally linked to the Earth's rotation. TAI, on the other hand, is fundamentally divorced from it. Thousands of years in the future, there will come a day when, according to TAI, the sun rises in Greenwich at midnight. This isn't just an abstract concern for the distant future. In the late '50s when TAI was defined, it was still common for ships at sea to figure out where they were by using a sextant to record the position of the sun above the horizon at a certain time and consulting a printed table of conversions. For this purpose, ships carried the most accurate clocks they could afford, and compared them regularly against true UT time using time signals broadcast by radio stations all over the world. Celestial navigation works very well when using a timescale which is tightly linked to Earth's rotation, and hence the position of things in the sky. But if the radio time signals switched to broadcasting TAI instead of UT, celestial navigation would become increasingly less accurate as TAI drifted further out of synch with the Earth and the stars. This meant that the "new and improved" TAI time scale wasn't actually an improvement for everybody. COORDINATING CHAOS Instead of broadcasting two different time signals for different purposes, which could easily lead to confusion, on January 1st in 1960 the powers that be (back then that was the International Time Bureau, or BIH, for the French "Bureau International de l'Heure", but today the torch has been passed to a combination of the International Bureau of Weights and Measures, or BIPM, for the French "Bureau International des Poids et Mesures" and the International Earth Rotation Service, who have the gall to abbreviate the *English* version of their name and go by IERS) defined yet another time scale, in an attempt to achieve the best of both worlds and make everybody happy. Enter Coordinated Universal Time, or UTC - at last, something normal people have heard of! The abbreviation UTC is a strange compromise between the English abbreviation CUT and the French abbreviation TUC (for "Temps Universel Coordonné"). This is somewhat fitting, because UTC itself is a strange compromise time scale between UT and TAI. Like TAI, UTC is an atomic time scale. Every second of UTC is exactly as long as any other, using the SI standard second based on caesium atoms, allowing scientists and engineers around the world to calibrate their instruments and reliably measure time intervals and frequencies very precisely. But whereas TAI is destined to drift ever further away from UT, to the chagrin of sailors and astronomers, UTC is kept synchronised closely enough with UT that it allows seafarers to perform celestial navigation with sufficient accuracy for safe ocean passage. This synchronisation is achieved, like all technical compromises, using ugly hacks. It cannot be any other way, as UTC is a stubborn attempt to reconcile two desirable but fundamentally incompatible properties of a timescale: perfectly regular seconds, and synchronisation with a spinning globe whose rate of rotation is unpredictably irregular. The precise nature of the ugly hack underlying UTC has changed somewhat since it was first defined, but for almost 50 years now, starting in 1972, the ugly hack of choice has been the leap second. The way it works is this. The difference between UTC and UT - a quantity denoted DUT - is carefully monitored. Any time it looks like that difference is on track to exceed 0.9 seconds, in either direction, UTC is kicked back into alignment by either inserting or removing a single second on one particular day. This makes UTC the *only* time scale where the number of seconds in a day is not absolutely fixed at 86,400 by definition. There almost always *are* 86,400 seconds in a UTC day, but 86,401 and 86,399 are also allowed when necessary to keep the time scale locked to the movement of the sun across the sky. So far, there have been 27 leap seconds defined, although UTC and ATI are today exactly 37 seconds apart - the other 10 seconds come from hacks applied before leap seconds were established in 1972. All of them to date have been insertions rather than removals. They don't happen on a regular, predictable basis, like leap years (which are an adjustment for the fact that the time it takes the Earth to orbit the sun once, defining a year, is not perfectly divisible by the time it takes the Earth to rotate once, defining a day). Because the Earth's rate of rotation fluctuates randomly, sometimes slowing down and sometimes speeding up, astronomers need to be actively on the lookout for excessive values of DUT. When it's decided a leap second is needed - it's the IERS who makes that call - they are announced at least six months in advance. They're allowed to occur on either June 30th or December 31st, and are inserted or deleted at midnight UTC (which is the middle of the day in some time zones, of course) on those days. At the time of writing, the last leap second happened on December 31st, 2016. In principle, six months is enough advance warning that nobody doing anything which depends on precise time synchronisation should be caught by surprise when a leap second rolls around. In practice, it's not always so simple. INCREASING IMPLEMENTATION BURDEN AND AN UNCERTAIN FUTURE Leap seconds have always had their critics, but at the time they were adopted, their benefits arguably balanced their associated hassle. 50 years later, this hack is starting to show its age. The advent of cheap and reliable GPS technology means that celestial navigation at sea is now rarely a matter of life or death (although some sailors still appreciate the relative simplicity of the technology it relies on), removing some of the argument for making sure UTC stays in lock step with the Earth's rotation. At the same time, the internet has come along: a massive network of computers talking to each other, with the frequent need for activity on one to be synchronised with activity on another (hence tools like the Network Time Protocol, NTP). Computer programmers *hate* leap seconds, for the same reason they hate Daylight Saving Time: they complicate time calculations (you can't accurately calculate the number of seconds between two UTC timestamps without consulting a table of when previous leap seconds were inserted) and are a frequent cause of confusion and errors, when one system implements them differently from another its trying to interoperate with. Affordances for leap seconds are often added to software as an afterthought - if they are added at all. Some systems represent the extra second using the timestamp 23:59:60, but others instead repeat the timestamp 23:59:59 twice (since some software will fail to parse a timestamp ending in :60). Other systems "smear" the leap second out over longer time periods, like 24 hours, to avoid problems associated with sudden discontinuities. This just leads to a whole day of small, slowly varying errors compared to non-smearing systems. Some systems, of course, forget to do anything at all. Because all the leap seconds to date have been insertions rather than removals, it's a safe bet that there's plenty of software out there which has worked correctly so far but will fail the first time a second is removed. And the Earth's rotation is going through a bit of a fast phase right now, so the first negative leap second might be looming on the horizon. The software interoperability situation at the time of a leap second is bad enough that several major stock exchanges simply agreed to voluntarily shut down for an hour around midnight UTC in 2016, rather than risk problems by continuing to trade during the leap second. Given that a number of major web services, including Amazon, Instagram, Netflix and Twitter, experienced outages around this time, this was probably not a bad idea. Of course, simply shutting time critical services off for every leap second isn't always an option. It's one thing to shut down the New York Stock Exchange for an hour, but Air Traffic Control has to stay up 24/7. It's no surprise that increasingly many voices in the tech industry are calling for leap seconds to be abolished. Plenty of people are very unhappy with that idea, of course, not to mention there's no consensus on what to do instead. It's far from clear what the future holds for the leap second. As software continues to eat the world, the headaches leap seconds cause are only likely to get worse. The atomic definition of second likely isn't going away any time soon, though, and that means that getting rid of leap seconds entirely means abandoning the millennia old notion that the way we represent time is intimately linked with the natural cycle of night and day. Assuming we're not willing to do that, there are only two alternatives: coming up with a new ugly hack which is somehow less problematic, or giving up on a "one size fits all" time scale. BUT WAIT, THERE'S MORE! If you think this story has been needlessly fiddly and complicated, rest assured I have skipped over a tonne of details. If you're actually interested to learn more, I highly recommend the article "The leap second: its history and possible future", which you can easily find on the web (full citation below), along with, as always, following Wikipedia links wherever they take you. Along the way you can learn the difference between UT0, UT1 and UT2, meet other exciting astronomic and atomic time scales like Ephemeris Time (ET), GPS Time (GPST) and Terrestrial Time (TT), and discover that the SI system of units defined the second based on something other than Earth's rotation when it was established in 1960, seven years before the caesium definition was adopted. - - -[ REFERENCES ]- - - Nelson, R., McCarthy, D., Malys, S., Levine, J.M., Guinot, B., Fliegel, H., Beard, R., & Bartholomew, T. (2001). The Leap Second - Its History and Possible Future. Metrologia, 38, 509-529. "Time-nuttery 101" by Ole Petter Ronningen https://efos3.com/TimeNut.html "UTC might be redefined without Leap Seconds" by Steve Allen https://ucolick.org/~sla/leapsecs/timescales.html - - - ------------------------------------------------------- - - - - - - - - --------------------------------------------- - - - - -