Time warp

New Scientist vol 180 issue 2422 - 22 November 2003, page 30

A temporal glitch is about to send millions of people prematurely into tomorrow. It's only a matter of time before another mix-up causes disaster, warns Stephen Battersby

ON AN early evening in the outskirts of Chicago, a bored driver stuck in a jam checks her in-car GPS navigation, and discovers that tomorrow has arrived 6 hours early. At the same instant, at midnight in the Scottish Highlands, a hiker is lost in fog. He pulls out his GPS handset, only to be told that tomorrow has disappeared altogether.

They are victims of a peculiar bug. For one second, just after midnight on the morning of Friday 28 November, GMT, any device that uses the popular Motorola Oncore GPS receiver is going to add one extra day to the date.

Of course, you'd have to be unlucky enough to check the time at precisely the right instant. The date will correct itself one second later, so this little glitch is unlikely to distress anyone, except perhaps the engineers at Motorola. And yet the Motorola bug may herald a profound change in the way we mark time: a change that could eventually turn day into night.

The cause is a seemingly trivial quirk of modern timekeeping called the leap second. About once a year the temporal authorities slip an extra second into the calendar. That's because atomic clocks are the basis of international time standards, and while they count up highly regular seconds, Earth is gradually spinning more slowly as the ocean tides raised by the moon's gravity drag against its rotation.

So if we just used the output of atomic clocks as ordinary civil time, our wris****ches would gradually get ahead of the motion of the heavens. Within a decade or two, dawn would be several seconds later. And as the Earth's spin gets progressively slower, the discrepancy would increase faster and faster.

Fortunately, we have the International Earth Rotation Service to keep civil time more civilised. Its astronomers use radio telescopes to track quasars in distant parts of the universe. Because they are so far away, these objects appear fixed in the sky, so they act as reliable markers for measuring Earth's rotation. The International Telecommunication Union in Geneva uses this information to compare "solar time", determined by the rotation of the Earth, with atomic time, the averaged output of about 50 caesium clocks around the world. It then concocts a blend of the two, called UTC, or coordinated universal time.

UTC shadows atomic time. But every now and again its progress is interrupted by a leap second, which ensures that it never differs from solar time by more than 0.9 seconds.

This has been going on since 1972. In 30 years, UTC has stuttered backwards by 22 seconds relative to international atomic time. To complicate things further, different technologies have their own internal time frames. When GPS started in 1980 it was synchronised with UTC, but because it doesn't add leap seconds it is now 13 seconds ahead of UTC and 19 seconds behind international atomic time.

You can see the potential for confusion - perhaps even for disaster. Since leap seconds were introduced, there has been a proliferation of automatic systems that need to know the time, from GPS and the internet to air traffic control computers. "And with them becoming more interactive, they need to be synchronised," says Ron Beard of the Naval Research Laboratory in Washington DC, who chairs the ITU's "special rapporteur group" looking into the future of the leap second. An out-of-kilter internet connection isn't too frightening a prospect, but you wouldn't want to fly in an airliner whose software got confused. Even military systems, such as smart bombs, rely on satellite navigation. Would a smart bomb be smart enough to cope if its time went haywire?

One problem is that clocks in these systems are not explicitly designed to accommodate the leap second. "Most clocks cannot record a second labelled '60', so the extra second sometimes appears with no label, or two seconds are labelled 59," says Dennis McCarthy, head of the US Naval Observatory's Directorate of Time in Washington DC. So for each system, software engineers have to find a way to slip in leap seconds. This may already have caused problems for the Russian equivalent of GPS, called GLONASS, which went offline for a few hours immediately after a leap second was added in June 1997.

The job is made harder by the fact that no one can know far in advance when the next leap second will be needed. Earth's rotation is slowing down, but not smoothly. Weather, ocean currents and mysterious happenings within the planet all exert their influence, making our spin a little jittery. Only by watching the skies can we tell how fast we are going round.

It's this unpredictability that has caught out Motorola. Over the past five years, something has actually made the Earth spin faster. No one is sure exactly what, but the best guess is that it's something going on 3000 kilometres down, where the planet's rocky mantle meets its liquid iron outer core. Friction or electromagnetic interactions between the mantle and core might be to blame. Or there might be some rearrangement of material in the core that does the same as the proverbial figure skater drawing in their arms and spinning faster. It can't go on for long - within a few years at most, the long-term slowdown will resume. But the recent speed-up means there have been no leap seconds since the end of 1998.

By 27 November this year, that will be exactly 256 weeks ago. And buried inside the Oncore software is an 8-bit number that counts the weeks since the last leap second was added. It can't cope with a number as big as 256. "When our software was written, there was the expectation that there would be a leap second at least every couple of years," says Dave Huntingford, Motorola's GPS product manager. "It's not going to handle the absence of a leap second correctly on 27 November." Why should this mean that the date leaps forward for just one second? Huntingford declines to go into details. "This is commercially sensitive," he says.

Motorola isn't concerned about the risk of startling a few midnight hikers, or any other lost souls. "The navigation people aren't worried about this problem," says Huntingford. And he laughs at the rumour that Oncore receivers are used in the US military's JDAM smart bomb. "These are just commercial grade receivers," he says.

The real problem for Motorola, apart from the embarrassing PR, is that Oncore chips are used as clocks to synchronise cellphone base stations in the US. GPS receivers work by comparing how long it takes signals from different satellites to arrive, and to give useful positioning information the times have to be accurate to within fractions of a microsecond. So if your position is fixed, GPS can be used as a very accurate clock, which is what the cellphone base stations use it for. Except at midnight GMT on 27 November.

"The Oncore time signal is also used in billings," says Huntingford. So there's a risk that some cellphone bills due on Friday 28 November won't be collected, because according to the base stations the first second of that day won't exist. "It's pretty bad for us to report that at a date in the future, a lot of revenue is going to disappear. And it disappears without a trace."

Could leap seconds open up other financial black holes? Not immediately, thinks John Laverty of the UK's National Physical Laboratory in Teddington. He points out that at present the National Association of Securities Dealers, which regulates financial services in the US, considers transactions occurring within 3 seconds of each other to be simultaneous. But if financial bodies want to trade on much shorter timescales in the future, then a leap second could conceivably reverse time sequences and lead to all sorts of ambiguity. If a share price crashes during the half second between 23:59:59.3 and 23:59:59.8, some ugly lawsuits could follow.

And temporal confusion could kill. William Klepczynski, a consultant with Global Timing Services in Washington DC, thinks it may create a fatal mix-up in air traffic control. "What I worry about is the possibility for human error. A controller may be looking at a display that indicates that an aircraft will cross a runway in 30 seconds, in navigation system time. He looks at his watch, set to UTC, and misjudges the time for another aircraft to cross the same runway. What are the chances of a collision?" It may sound like an elementary error for a highly trained professional, but Klepczynski worries that it could be triggered by the pressure of the job. "I do not believe that air traffic controllers work in a stress-free environment."

Automated systems might be flummoxed too. "If you have a single system engineered by one group of people, it's easy to allow for leap seconds," says Markus Kuhn, a computer scientist at the University of Cambridge. "But the worldwide air traffic control system is more complicated. If you have lots of systems tracking lots of planes, it's conceivable in such an environment that even a well-announced leap second could cause problems."

So why haven't there been any crashes or worrying incidents in the 30 years we have had leap seconds? "Current air traffic control systems aren't that sophisticated yet," says Kuhn, "but as they become more reliant on GPS-like navigation, the leap second might become an annoyance." In the future, a tiny receiving antenna could replace every plane's radar, broadcasting its position and where it is heading according to GPS. Prototype systems have been built, according to Kuhn, and researchers are getting a headache planning what to do just before and after a leap second.

If they are so irritating, and potentially dangerous, do we actually need leap seconds? Many people think not. Beard would prefer a continuous timekeeping system without pesky second jumps. His group has drafted a recommendation to the International Telecommunication Union to scrap them in 2022. In May, the possible new timescale was discussed at a meeting in Turin, Italy. Named simply international time, or TI, it would start out synchronised with UTC, but be free of leap seconds. Problem solved?

Not yet. Even those at the meeting couldn't agree. On a show of hands, 14 were in favour of a change to TI and 7 against. And although it was an open meeting, Laverty says it was attended mostly by the "in crowd" - the scientists concerned with establishing time standards. "We were hoping that more 'users' would turn up, such as internet systems managers," says Laverty.

So far, the strongest opposition to killing the leap second has come from astronomers. Already beleaguered by light pollution from city sprawl and radio-wave pollution from mobile phones, they are now facing the prospect of time pollution.

There is one purely practical reason for astronomers to be concerned: they use the time to work out where to point their telescopes. In some cases this is still done manually, but in others it is automatic. If standard civil time switches to TI and no longer keeps pace with the Earth, a lot of software will have to be rewritten to compensate. Steve Allen of the Lick Observatory near San Jose in California thinks the cost could be up to $100,000 for some telescopes.

A more profound objection is that for most people, time means time of day, so it's explicitly defined by the rotation of Earth. In that sense it seems absurd to fix civil time to the output of atomic clocks, which simply count up standard seconds, each defined as 9,192,631,770 cycles of one particular resonance of a caesium-133 atom. The standard second is roughly the same as a solar second back in 1820, so even when atomic time started in 1967, it was out of sync with the Earth.

Allen admits that if the leap second is scrapped, our everyday lives won't be affected for many decades. "Almost nobody would notice, aside from the owners of high-precision sundials." And as they are already outnumbered by the owners of GPS receivers, the vote goes against the leap second there. But in the longer run, things would get a bit weird.

In seven or eight centuries' time, the discrepancy will be an hour. In the winter of 4000, the sky will still be dark at noon. And by around 5000, night and day will have swapped over.

One suggested solution to this temporal slippage is the "leap hour": in a few hundred years we could all add an extra hour to bring TI back roughly in line with solar time. The idea got short shrift in Turin, however. "It would be 3600 times more disruptive than a leap second," says Kuhn. "And I doubt that anyone would have the political power to decide 'right, it happens now'." In 1582, he says, the pope had enough power to cut 10 days from the calendar, but even that took half a millennium to be accepted everywhere. "The Y2K debacle told us that we are now so dependent on our timescales in terms of investment in computer systems that something like this is not going to happen. It's a clear non-starter."

The continued slowing of the Earth's spin probably means that leap seconds can't go on indefinitely. Before the year 4000 there would have to be a leap second at the end of every month. At some point they would become unacceptably frequent.

But do leap seconds need to be abandoned any century soon? Allen doesn't think the arguments for scrapping the leap second hold up. He is confident, for example, that GLONASS can cope with leap seconds. The GLONASS team says the downtime in 1997 had nothing to do with the leap second - that was just a coincidence. In 1998, the system coped perfectly well with another leap second. The GLONASS glitch could well be a myth.

As for a possible air traffic control disaster, Laverty is dismissive. "I think it's a red herring. Even if we do away with leap seconds, we will still have a multiplicity of timescales. And I would hope that people writing air traffic control software would catch errors as big as a second."

And there may be more practical reasons to keep leap seconds. As the Motorola glitch has shown, industry may simply not yet have woken up to the potential problems of abandoning them. "Possibly only a few academic astronomers have had the time to take it seriously," says Kuhn. "A lot of pieces of hardware need to know the angle of Earth in space - satellite-tracking equipment, for example. At the moment, they assume that solar time and UTC differ by no more than a second."

Kuhn suspects most industrialists either don't understand the difference or think that the idea of redefining time is so ludicrous it could never happen. "As the prospect becomes more serious, there may be more serious resistance from industry," he says.

All this leaves leap seconds in limbo, for now. The recent movement to abolish them might run out of steam when more people realise the consequences. Or one day a sloppy computer system might mishandle a leap second and cause a disaster. "My personal suspicion is that, in the end, inertia will win," says Kuhn. He believes it will be easier to keep leap seconds.

That may make good sense in the short term, but in the long run, technology may well trump nature. In a world where various virtual realities come to mean more to us than the real one, the regularity of atomic time might become preferable to the unreliable rotation of the third rock from the sun.