Skip to main content

Why your phone's clock is right and your wall clock isn't

A melting smartphone displaying an analog clock face lies on a cracked salt flat at sunset, a heron standing beside it and a glowing clock face on the ground.

In January 2018, the clocks on ovens and microwaves across Europe began to fall behind.

A photograph of a digital clock display built into a kitchen oven, showing the time.
The clock nobody corrects: an oven clock keeps whatever time its quartz drift earned it — there is no protocol climbing down any ladder to fix it.

Not the phones. Not the computers. The clocks that keep time by counting the electricity. Second by second the error accumulated, evenly, everywhere at once, until by early March every frequency-driven clock in 25 countries was about six minutes slow. A continent had lost time.

Your phone was fine. It is fine every day, and the reason is not a better crystal — left alone, a phone drifts like any quartz device. The reason is that the phone’s clock gets corrected, quietly, against a hierarchy of atomic clocks, by a protocol built for exactly this job. The wall clock has never been corrected in its life.

That is the whole difference, and it has a mechanism. How the phone gets its time, what happens when the correction lands, and why the correction itself is the one thing that can move a running stopwatch.

The protocol that corrects the phone

The protocol is NTP, the Network Time Protocol. It was designed by David L. Mills at the University of Delaware and first documented in 1985; the current specification is RFC 5905, published in 2010. It is not Google’s and not Apple’s and not NIST’s. Those organisations run servers. The protocol itself belongs to no one — which is why everyone’s phone can use it.

The servers are arranged in a ladder called strata. At stratum 0 sit the reference clocks: caesium standards, GPS receivers, radio time signals. A stratum 1 server reads its time directly from one of those, and is typically precise to within a few tens of microseconds. Each level below adds a hop and some network noise. By the time time reaches a phone over the public internet, it is good to a few tens of milliseconds — and the protocol knows how good it is. Every exchange carries four timestamps, two set by the client and two by the server, from which both the offset and the round-trip delay are computed. The network’s travel time is subtracted out.

A vertical ladder diagram showing reference clocks at the top, stratum one servers below them, intermediate servers in the middle and a phone at the bottom, with precision annotations tightening from tens of microseconds at the top to tens of milliseconds at the phone.
Where a phone’s rightness comes from: a ladder of increasingly noisy hops away from the atomic references — and the reason the phone is right is not the ladder but the corrections that climb back down it.

A phone typically talks to a stratum-1 server run by its own vendor. Android’s default is time.android.com; Apple runs a fleet of stratum-1 servers at time.apple.com. Since Android 12 the system prefers NTP over the cellular network’s own time push, NITZ, for the plain reason documented by Google: NTP is more accurate and more reliable. Android polls every 18 hours by default, retrying every minute on failure. Apple does not publish its schedule.

And the correction has error bars of its own. Android’s documentation puts the theoretical worst case for its sync at about 2.5 seconds — if the network timeout hits and all the latency lands on one leg of the trip. Between corrections, the phone is what it is: a quartz device, drifting at quartz rates.

The 125-millisecond line

Here is the part that matters for anything that measures time.

When a correction arrives, RFC 5905’s clock-discipline algorithm makes a decision. If the phone’s clock is off by less than 125 milliseconds, the correction is a slew: the system does not reset the clock, it changes the clock’s rate. The clock-adjust process runs at one-second intervals, adding a frequency correction and a fraction of the residual offset until the error is absorbed. Nothing jumps. A user watching the clock sees nothing at all.

If the offset is larger than 125 milliseconds but under 1000 seconds, the correction is a step: the clock is rewritten outright, and the protocol treats this as the drastic event it is. All the accumulated timing data is invalidated, and the client starts over as if rebooted. Beyond 1000 seconds, the daemon gives up entirely: that is a panic, not a correction.

Under normal operation, the step almost never fires. Typical internet offsets are in the tens of milliseconds, well inside slew territory, and that is by design: the protocol is built so that a healthy connection produces no discontinuity, ever.

But a step is possible, and a slew is always happening. Which is why a stopwatch has to care. A step is a discontinuity — a running timer that reads the system clock jumps with it. A slew is subtler and more interesting: the rate changes, so an interval measured across a slew is quietly warped, by a few parts per million, in the direction of the correction. We have traced exactly what this does to a running timer: the step shifts it, the slew bends it. The correction that keeps your phone right is the one thing in the phone that can touch a running measurement.

One second, spread across a day

The philosophy has a demonstration case: the leap second.

A leap second is a one-second step scheduled by hand — the worst kind of correction, as the systems that broke on leap seconds can testify. Google’s public NTP service refuses to deliver it as a step. Instead it smears the second across 24 hours, noon to noon: the clocks it serves run fast by a fixed amount, and by the end of the day the second has been added without ever existing as a jump. Google’s own figure for the rate change is 11.6 parts per million — small enough to hide inside the manufacturing tolerance of an ordinary quartz crystal.

That is the slew, applied to the most awkward correction in timekeeping. The right amount of time, arriving at a rate nothing can notice.

The clock that counts the grid

Now the other side of the kitchen.

A mains-powered clock has no oscillator of its own worth the name. Its motor counts cycles of the alternating current — 50 per second in Europe, 60 in North America — and the grid does the rest. This works because grid operators hold the long-run average frequency close to nominal, compensating for the running total rather than each instant. The clock’s accuracy is not an instantaneous property. It is an integral.

In 2018 the integral broke. A political dispute left Kosovo drawing more electricity than it generated — 113 gigawatt-hours of uncontracted energy between mid-January and early March — and because Kosovo sits inside the Continental European grid, all 25 countries of the synchronous area absorbed the imbalance together. The average frequency slipped to 49.996 Hz. Four thousandths of a hertz sounds like nothing; to a clock counting cycles, it is a slow, permanent undercount. ENTSO-E, the grid operators’ association, announced the deviation on 3 March, when the affected clocks stood about five minutes behind. The loss ran on to roughly six.

Then comes the part that deserves to be better known. There is no way to correct a mains clock — it has no input but the wire. So the grid corrected itself instead: for about a month, the operators deliberately ran the Continental European system at an elevated average of 50.01 Hz, generating a surplus of cycles, until every synchronous clock on the continent had counted its six minutes back.

The only way to fix those clocks was to speed up a continent.

A two-panel time chart of early 2018, the lower panel showing grid frequency dipping below 50 hertz and then running above it for a month, the upper panel showing clock error accumulating to about six minutes slow and then recovering to zero.
The integral, plotted: a four-thousandths-of-a-hertz shortfall accumulating into six lost minutes across 25 countries — and the only repair possible, a month of running deliberately fast until every clock had counted its time back.

The clock that was right once

The AA-battery quartz wall clock fails differently, and the two failures are worth keeping apart.

A quartz wall clock is an independent oscillator with no feedback. The movements sold to clock assemblers — the kind in a fifteen-dollar clock — are specified by their manufacturers at about ±20 seconds per month at room temperature. There is no correction coming. Such a clock is accurate exactly once: at the factory, on the day it was set. Everything after that is drift accumulating in the dark. Mills measured room-temperature computer crystals drifting as much as a second a day back in 1989; a wall clock is luckier, usually, but nobody is steering it.

(Some wall clocks are radio-controlled or networked, disciplined overnight against a national time signal. They are real, and they are not what most people mean by “the wall clock”.)

A photograph of a wall clock with hands, of the type that contains a radio receiver synchronized to a national time signal.
The other way a clock stays right: not corrected over the internet, but listening to a time signal — the wall clock that quietly does what the phone does, without the phone.

What the phone’s rightness costs

Put the two clocks side by side and the asymmetry is total. The wall clock is wrong but self-contained: it displays exactly what it has accumulated, no more. The phone is right because it keeps being changed — slewed a few parts per million this way, nudged back that way, eighteen hours at a time.

If you time things, both facts matter once. TiCaNo Stopwatch reads elapsed time from your device’s clock, so it inherits the crystal and the corrections together. For anything started and stopped by a thumb, the crystal’s drift is nowhere near the limiting factor. The corrections are the interesting inheritance: across a slew, an interval carries the warp; across a step, it jumps. It is the one price of a corrected clock, and it is knowable in advance.

The wall clock never pays it. The wall clock was never right enough to have anything to correct.

Sources