The Coming Leap Second Clock Adjustment: A Little Prevention is Worth The Effort

Share Your Thoughts: Facebooktwitterlinkedin

For those of you who remember the disaster mitigation and recovery planning that was associated with the Y2K technological risk, you might find it interesting to note that small adjustments in the world’s atomic clocks still need to be done periodically to keep us all in sync and as well maintain social and economic harmony with the planet. Most people are aware of “Leap Year” adjustments where an entire day is added to the year (in the month of February) but fewer know that there are also “Leap Second” adjustments inserted periodically as well.Clock

Atomic Time vs. Universal Time

Coordinated Universal Time or UTC is a standard, not a time zone. In other words, it is the base point for all other time zones in the world. They are determined by their difference to UTC. UTC is represented as UTC +0. Coordinated Universal Time is a 24-hour time standard that is used to synchronize world clocks. In order to keep Coordinated Universal Time as accurate as possible, two other time standards are used: International Atomic Time or TAI, and Universal Time also known as Solar Time.

There are two components used to determine Coordinated Universal Time (UTC). These are:

  1. International Atomic Time (TAI): A time scale that combines the output of some 200 highly precise atomic clocks worldwide, and provides the exact speed for our clocks to tick.
  2. Universal Time (UT1), also known as Solar or Astronomical Time, refers to the Earth’s rotation around its own axis, which determines the length of a day.

As you might expect, these two units of measurement gradually move out of synchronization with each other. When the difference between UTC and UT1 approaches 0.9 seconds, a leap second is added to UTC and to clocks worldwide. By adding an additional second to the time count, our clocks are effectively stopped for that second to give Earth the opportunity to catch up with atomic time. The reason we have to add a second now and then is that Earth’s rotation around its own axis is gradually slowing down, although very slowly. Atomic clocks, however, tick away at pretty much the same speed over millions of years. Compared to the Earth’s rotation, atomic clocks are simply too consistent.

Upcoming leap seconds are announced by the International Earth Rotation and Reference System Service (IERS) in Paris, France. Before the first leap second was added in 1972, UTC was 10 seconds behind Atomic Time. So far, a total of 26 leap seconds has been added. This means that the Earth has slowed down an additional 26 seconds compared to atomic time since then. (However, this does NOT mean that the days are 26 seconds longer nowadays. The only difference is that the days a leap second was added had 86,401 seconds instead of the usual 86,400 seconds.)

Leap seconds and leap years are both implemented to keep our time in accordance with the position of Earth. However, leap seconds are added when needed, based on measurements, and leap years are regularly occurring events based on set rules. During leap years, an extra day is added as February 29th to keep the calendar synchronized with the precession of the Earth around the Sun. Leap years are necessary because the actual length of the year is 365.2422 days and not 365. The extra day is added every four years to compensate for most of the partial day. However, this is a slight over-compensation, so some century years are not leap years. Only every fourth century year (those equally divisible by 400) is a leap year. For instance, 2000 was a leap year, but 1900, 1800 and 1700 were not.

Business Continuity Implications

The next leap second will be added on December 31, 2016 at 23:59:60 UTC. The difference between UTC and International Atomic Time (TAI) will then increase from the current 36 seconds to 37 seconds.

According to the National Institute of Standards and Technology (NIST) by keeping Coordinated Universal Time (UTC) within one second of astronomical time, scientists and astronomers observing celestial bodies can use UTC for most purposes. If there were no longer a correction to UTC for leap seconds, then adjustments would have to be made to time stamps, legacy equipment and software which synchronize to UTC for astronomical observations. However, adding a second to UTC can create problems for some systems, including data logging applications, telecommunication systems and time distribution services. Special attention must be given to these systems each time there is a leap second.

I recently ran across Tom Brant’s essay about the coming adjustment and some of the technological implications in PC Magazine “2016 Needs a ‘Leap Second’ to Sync With Earth’s Rotation” in which describes the next “leap second” adjustment to Atomic Clocks scheduled to occur on December 31, 2016.

According to Brant, “the people responsible for measuring the world’s time have got very good at determining just how long a second is supposed to last—the most accurate clock in the world uses cesium atoms to determine the exact length of a second, and it won’t get out of sync for at least 300 million years. But the question of how many seconds are in a year is far less certain. The International Earth Rotation and Reference Systems Service, which is responsible for Coordinated Universal Time (UTC), decides twice a year whether or not a “leap second” is needed to ensure that the world’s clocks are in sync with the Earth’s rotation, and this week its scientists decided that 2016 needs one of those extra seconds. It will be added at midnight on Dec 31, when clocks will read 11:59:59 p.m., then 11:59:60 p.m., before the stroke of 12:00:00 a.m. ushers in the year 2017. That slowdown is roughly equivalent to a loss of around two milliseconds per day, so the Paris-based IERS evaluates whether or not to add a leap second twice per year, on June 30 or December 31. As the US Naval Observatory explains, ‘[a]fter 500 days, the difference between the Earth rotation time and the atomic time would be one second. Instead of allowing this to happen a leap second is inserted to bring the two times closer together.’ A leap second has been added 26 times since the practice began in 1972, according to the observatory.”

“One day this year we’ll have 86,401 seconds, not the usual 86,400. When that’s happened before it’s caused some software to get way out of whack.” – Network World

Patrick Nelson’s writing in Network World before the last Leap Second adjustment identified some of the IT business continuity concerns:

“…official clocks will pause by one second to let the earth’s rotation catch up with atomic time. Shouldn’t be a problem, right? Only tell that to LinkedIn, Reddit, and Qantas. All three were running systems that crashed in 2012, when the last leap second was added. The prior leap second in 2005 also caused problems with some computers, including Google’s. Well, it’s time again for another one. So brace yourself for potential trouble. Indeed, it may well be time to ask server system vendors about their mitigation plans….

What happened in 2012? Issues arose at Foursquare, LinkedIn, Mozilla, Qantas, Reddit, StumbleUpon and Yelp, who all reported crashes, according to media reports. Joab Jackson of IDG News Service wrote at the time that unpatched Linux kernels, Hadoop instances, Cassandra databases and Java-based programs were affected. Some servers running Debian Linux went offline. What caused it?

Computing systems and their Network Time Protocol, or NTP, client software need to be programmed to handle unforeseen extra seconds. If the software isn’t programmed correctly, unexpected seconds can cause problems. NTP is used to sync with the atomic clock. In some cases in the 2012 leap second implementation, NTP had to be disabled in order to restore servers. Linux patches were available before that leap year adjustment because the NTP high-resolution timer used was known to potentially cause a livelock. Livelocks are a way that a process doesn’t progress. The patches presumably weren’t applied in some cases.”

Robert McMillan’s writing in advance of last year’s leap second insertion in (“The Leap Second Is About to Rattle the Internet. But There’s a Plot to Kill It”) reported:

“The Qantas Airways computers started crashing just after midnight. A few hours later, as passengers started flying home from weekend getaways, there were long delays in Brisbane, Perth, and Melbourne, and the computers still didn’t work. Qantas flight attendants were forced to check passengers in by hand. That Sunday morning in July 2012 was a disaster for Amadeus IT Group, the Spanish1 company responsible for the software that had computer screens flickering at Qantas kiosks. But it wasn’t entirely the company’s fault. Most of the blame lay with an obscure decades-old timing standard for the UNIX operating system, a standard fashioned by well-intentioned astronomer time lords. They were working for an international standards body, a precursor of the International Telecommunications Union, which today officially tells clock-keepers how to tell the rest of the world what time it is. Back in 1972, they decided to insert the occasional leap-second into Coordinated Universal Time (UTC), the standard most of the world uses to set wristwatches.

We’ve had 25 of these leap seconds since then, and we’re about to get our 26th. This week, the modern time lords announced that the next leap second will arrive at 11:59 pm and 60 seconds on June 30. That has some computer experts worried. Amadeus wasn’t the only company to go glitchy during the last leap-second. Reddit, Foursquare, and Yelp all blew up thanks to the leap second and the way it messed with the underlying Linux operating system, which is based on UNIX.

The trouble is that even as they use the leap second, UNIX and Linux define a day as something that is unvarying in length. ‘If a leap second happens, the operating system must somehow prevent the applications from knowing that it’s going on while still handling all the business of an operating system,’ says Steve Allen, a programmer with California’s Lick Observatory. He likens it to the problem facing the HAL 9000, the fictional onboard computer in Stanley Kubrick’s 2001: A Space Odyssey, which loses its mind after it is programmed to lie. ‘All the problems that crop up are, in a metaphorical sense, the HAL 9000 problem. You have told your computer to lie. I wonder what it will do,’ he says. The Linux kernel folks aren’t expecting any major issues when July 1 comes around, but the situation is unpredictable. Back in 2012, Linux creator Linus Torvalds told us: ‘Almost every time we have a leap second, we find something.’ And this time around, there will be problems again. Torvalds doesn’t think they’ll be as widespread as they were three years ago, but they’re largely unavoidable. The ‘reason problems happen in this space is because it’s obviously rare and special, and testing for it in one circumstance then might miss some other situation,’ he says.”

The leap second is yet another uncertainty for which business continuity planners, and particularly those responsible for IT systems, should be aware and take preparedness measures to mitigate and/or quickly recover from the next predictably unforeseen event.

View the following PBS video to learn more about the science behind the Leap Second.

Share Your Thoughts: Facebooktwitterlinkedin