News
Artificial Intelligence and Machine Learning News

Split Second

The issue of whether to add a "leap second" to square the clock with the Earth's orbit pits time specialists against IT.
Posted
  1. Introduction
  2. Further Reading
  3. Author
leap second clock time

The question, "what time is it?" seems simple on its face, but it is a question that delegates to the World Radiocommunication Conference will struggle with when they meet in Geneva this November. At issue is whether to keep the world’s definition of time as it is, or to alter it by removing the concept of a leap second.

On 26 occasions since 1972, clocks around the world have stopped for one second to adjust for the difference between the Earth’s rotation and Coordinated Universal Time (UTC, under the French acronym). Those adjustments mean the sun remains over the Prime Meridian at noon, but they also cause a host of problems for computers worldwide. For example, the leap second that happened on June 30, 2012 crashed the software powering airline reservation systems in Australia, and also led to issues with services including Reddit, Foursquare, and Yelp.

Many IT experts would like to do away with the leap second altogether, or adjust how it is implemented so their computers can deal with it more readily. Whether the International Telecommunications Union (ITU), which governs UTC, will actually do that in November, however, is anybody’s guess. The ITU has been considering the question since 2005 without resolving it.

"The fundamental problem is there’s no way of making everybody happy," says Judah Levine, a physicist in the Time and Frequency Division at the National Institute of Standards and Technology, which maintains and distributes standard time signals for the U.S., but takes no official position on the leap second debate. "Pretty much the entire timing community wants to get rid of the leap second, and the reason is it’s a major hassle."

Ron Beard, head of the positioning, navigation, and timing branch of the U.S. Naval Research Laboratory and international chairman of the ITU working group that covers time signal services, says more devices and systems are relying on knowing the precise time than ever before. "If you have to stop or change the clocks one second at the same moment in the entire world, that’s a big step," he says. "It’s not a trivial matter."

Leap seconds introduce a discontinuity that can throw computers off-kilter. Generally, a leap second is added at midnight at the end of either June or December. When a clock gets to 23 hours, 59 minutes, and 59 seconds, it does not roll over into the next day, but repeats that last second, which can prove confusing to algorithms. Suddenly it may be impossible to tell which of two events came first, causing programs to send up error flags or simply stop working. "When you have two consecutive seconds with the same name, you lose track of causality during that time," Levine says. "During the leap second, if I tell you it’s 23:59:59, you don’t know if it’s the first version or the second version."

A leap second is such a rare event, Levine says, that it is often done incorrectly—a program may add a second when it is not supposed to, or not add it when it is, or subtract a second instead, leading to separate systems disagreeing about what time it really is. The problems such disagreements might cause are unpredictable.

"There are a number of factories that shut down across leap seconds because they don’t want a valve to turn on or turn off" at the wrong time, says Warner Losh, an independent software consultant who has worked on projects involving high-precision timing. He says pharmaceutical companies, for instance, worry that a timing glitch could lead to too much or too little of an ingredient being added to a batch of drugs, or the temperature of a process being set incorrectly. Errors can arise in other industries as well. A power fluctuation—unrelated to leap seconds—hit a Toshiba plant making flash memory chips in 2010. It lasted only 70 milliseconds, but caused the company to scrap 20% of its products.

Poul-Henning Kamp, a software developer in Denmark, worries a glitch might even prove serious enough to get someone killed. "I believe that is only a matter of time," he says. "More and more systems are integrated closer and closer, including life-support medical machinery."

One reason leap seconds are such a headache is that they are rare and unpredictable. They are decided upon by another standards body, the International Earth Rotation and Reference Systems Service (IERS). Sloshing tides acts as a brake on the Earth’s rotation, and weather, earthquakes, even melting glaciers, also come into play. When the IERS determines the planet is falling behind UTC, it issues the announcement that a leap second will be added six months hence. The latest leap second was inserted on June 30, just before this story was written.


A workaround Google adopted before the 2012 adjustment is to skip the leap second altogether and instead stretch the seconds leading up to it by a few milliseconds.


Six months, Losh complains, gives IT people too little warning; they can test their programs, but there could be a rare routine or a spare that has been out of use that gets skipped. "Since leap seconds are a rather exceptional thing, that code isn’t tested very often," Losh says. "It’s very easy to insert problems that don’t show up until a leap second happens."

Though leap seconds are generally added every 12 to 18 months, there was a seven-year period from 1998 to 2005 with no leap seconds. Even that caused a problem, when Motorola’s Oncore GPS receivers decided that 256 weeks was long enough without a leap second and added one in November 2003 that nobody was expecting.

One solution might be to schedule leap seconds at regular intervals, so programmers would know of them well in advance, though that would mean the planet would be out of sync with UTC for some period. Another would be to wait much longer, then add a leap minute. No serious proposal to take such steps has been put forward, Levine says.

A workaround, which Google adopted before the 2012 adjustment, is to skip the leap second altogether and instead stretch the seconds leading up to it by a few milliseconds. Most systems can tolerate variations of a couple of hundred milliseconds without problems. Once the clocks reach midnight and the leap second passes, the computers and UTC are again in sync without the discontinuity caused by repeating a second, but that can bring up other issues.

A second is legally defined in terms of the number of oscillations of a cesium atom in an atomic clock, and those are the seconds the ITU uses in universal time. For financial institutions that have legal obligations to timestamp documents accurately, using non-regulation seconds could get them in trouble. Additionally, some scientists use time servers, such as those maintained by NIST, to measure intervals in their experiments. To ensure experiments are repeatable, they have to know the seconds they use on one day are the same length as those on another day.

So why keep the leap second? "The resistance is mostly from, I would call them traditionalists, who feel it would be a travesty to have the sun not be on the meridian at noon," says Dennis McCarthy, retired director of time at the U.S. Naval Observatory. Just as leap days were added to the Gregorian calendar to keep the equinoxes and solstices from drifting out of their accustomed months, these traditionalists argue, so leap seconds are needed to keep the sun at the right place in the sky. "I think that’s just theater," Levine says of that argument. "The rate of offset is about a minute per century, so it’s going to be a long time before it’s midnight at noon." Levine believes national pride, particularly British attachment to Greenwich Mean Time, which currently matches UTC, plays a role.

On the other hand, Ken Seidelmann, former director of astrometry at the U.S. Naval Observatory and an astronomy professor at the University of Virginia, says there could be religious, cultural, legal, and financial implications of redefining UTC that have not been considered. "I think it is unprecedented to eliminate a time scale that is needed, just because it is inconvenient," he says. "Once mean solar time is abandoned, how would you return to it?"

He points out that the Global Positioning System uses International Atomic Time, which does not include a leap second, but does provide offset information so that systems receiving GPS signals can translate to UTC. People who need it could simply use atomic time, he argues, while leaving UTC untouched.

McCarthy chaired a working group of the International Astronomical Union (IAU), created to see if that body wanted to take an official position on the leap second. Some astronomers argue that, if official time and the position of the Earth drift apart, it becomes more difficult to know where to point their instruments, though McCarthy says making an adjustment is fairly easy. Ultimately, the IAU decided not to take a stance. "The astronomical community, outside of a few very vocal individuals, doesn’t care," McCarthy says.

He thinks most of the rest of the world will not care much either if the leap second disappears. "Noon" has not really been at "noon" in most places since time zones were introduced to straighten out the confusion in train schedules. Most people seem to adjust to Daylight Saving Time without much difficulty, and China, which is wide enough for five time zones, only has one, and manages to get by, McCarthy says.

He is not sure the leap second will be abolished in November, but he believes its eventual demise is inevitable. "We will indeed do away with the leap second," McCarthy says, "because it will just become too inconvenient to keep doing this."

Back to Top

Further Reading

Finkleman, D., Allen, S., Seago, J., Seaman, R., and Seidelmann, P.K.
The Future of Time: UTC and the Leap Second, American Scientist, 99, 312–319 (2011)

Kamp, P-H
The One-Second War, Communications of the ACM, 54, 44–48 (2011)

Nelson, R.A., McCarthy, D.D., Malys, S., Levine, J., Guinot, B., Fliegel, H.F., Beard R.L., and Bartholomew, T.R.
The leap second: its history and possible future, Metrologia, 38, 509–529 (2011)

Beard, R.
To abolish or not to abolish the leap second? The past and future of Coordinated Universal Time, ITU News, (2013) http://bit.ly/1FdX5t6

Leap Seconds, The UK Public Dialogue http://leapseconds.co.uk/reports-findings-dialogue/

Back to Top

Join the Discussion (0)

Become a Member or Sign In to Post a Comment

The Latest from CACM

Shape the Future of Computing

ACM encourages its members to take a direct hand in shaping the future of the association. There are more ways than ever to get involved.

Get Involved

Communications of the ACM (CACM) is now a fully Open Access publication.

By opening CACM to the world, we hope to increase engagement among the broader computer science community and encourage non-members to discover the rich resources ACM has to offer.

Learn More