Skip to content
The History of Time · Part 5 of 5History19 min read

How Your Phone Knows the Time: Atomic Clocks, Leap Seconds and the Network Behind Them

How a wobbling Earth gave way to caesium atoms, 27 leap seconds, GPS and NTP, and how your phone gets the exact time. Part 5 of the history of time.

On this page
  1. The minute that had 61 seconds
  2. A planet that cannot keep time
  3. Atoms take over: from ammonia to the caesium second
  4. UTC and the leap second
  5. GPS: a clock that never adds a leap second
  6. NTP: the network that sets your phone
  7. The tz database: from UTC to the clock on the wall
  8. What comes next: the end of leap seconds and a better second
  9. Checking your own clock
  10. Frequently asked questions
  11. Sources and further reading

The minute that had 61 seconds#

On Saturday, December 31, 2016, Coordinated Universal Time (UTC), the standard behind the world's clocks and computers, did something it had done 26 times before. The last minute of the year counted 23:59:58, then 23:59:59, then a second that almost never appears: 23:59:60. Only then did the date roll over to January 1, 2017. For that minute, UTC had 61 seconds.

Not every program coped. Cloudflare, which runs name-lookup (DNS) servers for its customers, published an account of what happened to its own. A program that timed how quickly other servers answered assumed that the gap between two clock readings could never be below zero. Around midnight UTC, with the leap second in play, some gaps came out negative and the program panicked. At the peak about 0.2 percent of DNS queries to Cloudflare were affected. The company blamed its own assumption, and The Register reported the same.

Why does the world's clock ever need a spare second? Because for most of the last century two clocks have run side by side: the spin of the Earth, which gave people the day and, by division, the hour, and the vibration of atoms, which proved steadier than the planet. A leap second is the stitch between them.

This is part five of our history of time. In part four, railways and telegraphs persuaded towns to give up their own noons and share clocks. That agreement still rested on the Sun. What follows is what happened when clocks became better than the sky.

Counts, sums and date arithmetic here that are not quoted from a source were calculated for this article, using the leap-second list shipped with the tz data.

A planet that cannot keep time#

Every clock in this series was ultimately checked against the heavens: the sundial of part one, the pendulum clock of part two, the chronometer of part three and the Greenwich time that railways spread. According to the BIPM, the International Bureau of Weights and Measures, the official second was 1/86,400 of the mean solar day until 1960.

The Earth is a poor clock. Over the long run it is slowing. NASA's Jet Propulsion Laboratory explains that tidal friction acts like a brake, and says the mean solar day has been longer than 86,400 seconds since about 1820 and, in the figure JPL gave when it wrote that, averaged about 86,400.002 seconds (the planet has sped up in recent years, so the current average is smaller). On top of that trend, each day's length shifts unpredictably. Another JPL feature describes a seasonal cycle of about a millisecond. That sounds negligible, but if every day ran a millisecond long, the error would reach a full second after 1,000 days, under three years.

While the Earth was the standard everything else was judged against, it was hard to catch out. The first instrument that could was the quartz clock. In 1927 Warren Marrison and J.W. Horton at Bell Telephone Laboratories built what is generally recognized as the first. Marrison was working on frequency standards, according to the National Inventors Hall of Fame, and the clock came out of that work as a by-product. Guinness World Records says it was shown to the public at an academic conference in October 1927.

Within a few years quartz clocks were exposing the planet's flaws. At the Physikalisch-Technische Reichsanstalt in Berlin, Adolf Scheibe and Udo Adelsberger began developing quartz clocks in 1932. By 1934, according to the German science site Wissenschaft.de, their clocks showed that astronomically measured time fluctuates unpredictably, and they argued that the Earth's rotation, not their equipment, was to blame. The same site says other scientists confirmed the claim only in 1948. Other observatories later reported the same seasonal pattern from their own quartz clocks. At Greenwich, for example, Smith and Tucker reported in the Monthly Notices of the Royal Astronomical Society that the Time Service's quartz clocks, over 1943 to 1949, pointed to an annual fluctuation in the length of the day of about plus or minus one millisecond. By then the clock on a laboratory bench could catch out the clock in the sky.

Atoms take over: from ammonia to the caesium second#

The first atomic clocks#

The idea behind an atomic clock is to use something nature makes identical. Every caesium-133 atom responds to the same microwave frequency, which NIST describes as an unchanging constant set by the laws of nature. The clock does not replace the oscillator inside an ordinary clock; it keeps it honest. In a NIST fountain clock, about 100,000 laser-cooled caesium atoms are tossed about 1.3 meters up through a microwave cavity and pass through it again as they fall. How many changed state shows how far the microwave frequency is from the atoms' resonance, and that error retunes the source.

The first device called an atomic clock used ammonia, not caesium. At the US National Bureau of Standards (now NIST), Harold Lyons and colleagues built it around the way ammonia molecules absorb microwaves. The IEEE history wiki dates the clock to 1948, and Guinness World Records says it was announced in January 1949. A NIST publication describes its performance as only slightly better than existing standards, and the IEEE history says other atomic clocks quickly surpassed its accuracy. The same NIST publication says the group moved on to caesium in 1950.

The caesium clock that mattered came from Britain. At the National Physical Laboratory (NPL) in Teddington, Louis Essen and Jack Parry brought one into operation in 1955. The IEEE history wiki gives May 24, while Lab News points to Essen's notebook entry of June 3. The Science Museum Group calls it accurate to a second in 300 years, about one part in 10 billion, while the Linda Hall Library gives one part in a billion. Physics World adds that it did not run continuously and recalibrated an external quartz clock every few days.

Redefining the second in 1967#

How long is an atomic second compared with the astronomers' second? William Markowitz at the US Naval Observatory tracked the Moon against the stars to work out ephemeris time, the scale astronomers had defined from orbital motion, while Essen ran the caesium standard. The BIPM's history of the second says the ephemeris second corresponded to 9,192,631,770 plus or minus 20 cycles of the caesium resonance. In 1960 the 11th General Conference on Weights and Measures (CGPM) had already moved the second off the day, defining it as a fraction of the tropical year 1900. In 1967 the 13th CGPM adopted the atomic definition in Resolution 1: the second is the duration of 9,192,631,770 periods of the radiation tied to the hyperfine transition of the caesium-133 atom.

In plain terms, think of the atom as a very small tuning fork. In its lowest energy state it has two closely spaced levels, and microwaves of exactly the right frequency make it flip between them. That frequency is defined to be 9,192,631,770 cycles per second, so counting that many cycles marks one second. One cycle lasts about 108.8 picoseconds. The number is what the 1950s measurement found, so the new second came out as long as the old ephemeris second. A revised wording adopted in 2018, effective in 2019, fixes the caesium frequency at exactly 9,192,631,770 hertz, according to the BIPM.

UTC and the leap second#

An atomic second needs an atomic day count, and no single clock provides one. According to a BIPM report from 2020, about 450 atomic clocks in more than 80 timing laboratories feed a weighted average that is steered against the best primary standards (the exact counts change from year to year). The result is International Atomic Time (TAI), computed after the fact and published monthly in Circular T. TAI never has a leap second.

UTC ticks at the same rate as TAI but differs from it by a whole number of seconds. When UTC took its modern form on January 1, 1972, TAI was ahead of it by 10 seconds, according to the IERS leap-seconds file. Royal Museums Greenwich says UTC replaced GMT as the international standard of civil time that year; our guide to UTC vs GMT covers the difference. The BIPM does not broadcast UTC itself. Each laboratory keeps its own version, written UTC(k), such as UTC(USNO).

A leap second is added when the gap between UTC and Earth-rotation time (called UT1) is predicted to approach 0.9 seconds, as Resolution 4 of the 27th CGPM puts it. The International Earth Rotation and Reference Systems Service (IERS) decides. All 27 so far fell at the end of June or December, and the IERS issues Bulletin C twice a year to announce one or confirm there will be none, as a reprint of Bulletin C 65 shows. Because the Earth's spin is unpredictable, the notice is a matter of months.

  • 27leap seconds since 1972, all of them additions
  • 37 secondshow far TAI is ahead of UTC since January 1, 2017 (10 at the start plus 27)
  • 6 months to 7 yearsthe gap between consecutive leap seconds
  • 108.8 psthe length of one cycle of the caesium radiation that defines the second

The rhythm was uneven: nine leap seconds in the 1970s, six in the 1980s, seven in the 1990s and five since 2000. The longest wait was seven years, from December 1998 to December 2005. The IERS says in Bulletin C 72, dated July 6, 2026, that none will be added at the end of December 2026, so as of October 9, 2026, it has been nearly ten years since the last, added at the end of December 31, 2016 (3,568 days).

A leap second is easy to describe and awkward to program. The 2022 resolution noted that operators of digital networks and satellite navigation systems use different methods to introduce it, with no agreed standard, and warned that this threatens critical infrastructure. Google says that since 2008 it has spread the extra second across the hours around it on its servers, a leap smear, instead of stepping clocks. Our guide to Unix time and ISO 8601 shows how computers count seconds.

GPS: a clock that never adds a leap second#

The Global Positioning System keeps its own time. According to US Naval Observatory briefings on gps.gov, GPS Time is a "paper clock" formed from a weighted average of satellite and ground-station clocks. It was set equal to UTC on January 6, 1980, a Sunday, and has no leap seconds, so each time UTC adds one the gap grows by a second. TAI was 19 seconds ahead of UTC then and is 37 seconds ahead now, so GPS Time is 18 seconds ahead of UTC, the figure a 2020 USNO briefing also gives.

Time scaleLeap seconds applied?Reads this when UTC reads 12:00:00
UTCYes12:00:00
GPS TimeNo12:00:18
TAINo12:00:37

The satellites broadcast a correction in their navigation message so that a receiver can recover UTC, and the briefings say the Naval Observatory measures GPS Time against its own UTC(USNO) while the Space Force steers it to match, apart from the whole-second offset.

NTP: the network that sets your phone#

How does a phone end up agreeing with a laboratory? It ranks several routes. A mobile carrier can send the time in a message called NITZ, but Wikipedia's NITZ article notes that support is optional and varies by operator. The main route is the internet: Android's documentation says that from Android 12 the system prefers NTP over NITZ because NTP is more accurate and reliable, and falls back to NITZ when NTP is unavailable.

NTP is the Network Time Protocol. Wikipedia says it has been in operation since before 1985, which would make it one of the oldest internet protocols still in use, and Mills's own history of NTP dates version 0 to 1985. One biography, on the Engineering and Technology History Wiki, puts the invention earlier, in 1981, so sources differ on exactly when it began. It was designed by David L. Mills, later a University of Delaware professor, who died on January 17, 2024, according to the university's obituary. The current version, 4, is RFC 5905, from June 2010.

How a computer asks for the time#

The trick is to measure the trip as well as the time. Your device sends a request and notes when it left, by its own clock. The server notes when the request arrived and when it replied. Your device notes when the reply came back. Those four timestamps give the round-trip delay, and averaging the two one-way differences gives your clock's offset, assuming the outbound and return trips took equal time.

Here is an invented example, in milliseconds. Your clock reads 0 when the request leaves. The server's clock reads 520 on arrival and 521 on reply, and your clock reads 100 when the reply returns. The round trip is 99 and the offset is ((520 minus 0) plus (521 minus 100)) divided by 2, so your clock is about 470 milliseconds behind.

Stratum: how far you are from a clock#

Servers are arranged in layers called strata. Stratum 0 is the reference clock itself, such as an atomic clock or a GPS receiver. A stratum 1 server is connected directly to one, a stratum 2 server takes its time from stratum 1 servers, and so on, as a summary of RFC 5905 describes. A higher number means more hops from a clock, not automatically a worse clock.

Under good conditions, Wikipedia says, NTP typically keeps clocks within tens of milliseconds over the public internet and can do better than a millisecond on a local network. Mills's slides likewise show sub-millisecond accuracy on a local network. Our guide to how accurate your phone or computer clock is looks at what this means in practice.

The tz database: from UTC to the clock on the wall#

An atomic clock can tell you the time in UTC. It cannot tell you what the clocks on the wall in Chennai or Chicago say, because governments decide that, and they change their minds. Software gets those rules from the IANA time zone database, also called the tz or Olson database, which Wikipedia describes as a collaborative compilation of time zone and daylight saving rules intended for computer programs and operating systems. Timelive's footer says its rules come from the IANA tz database via your browser, which covers the world clock and the time zone converter.

It began with one person's code. Arthur David Olson wrote the original time zone code, and in a 1993 history Paul Eggert says its best-known release appeared in comp.sources.unix on April 19, 1989. Olson then maintained the database and ran its mailing list for years, according to RFC 6557.

In September 2011 an astrology software company, Astrolabe, sued Olson and Eggert for copyright infringement, claiming the database relied on an atlas it owned, according to the Electronic Frontier Foundation's case page. The Associated Press, in The Washington Times, says the database came off a US government server on October 6 and the Internet Corporation for Assigned Names and Numbers (ICANN) took over its management. The EFF reports that the case was dismissed in February 2012, after Astrolabe accepted that historical facts are no one's property.

RFC 6557, published in February 2012, then set out a formal arrangement: a database kept by volunteers under a single TZ Coordinator, with changes discussed on a public mailing list at tz@iana.org. As of October 2026 the IANA page names Paul Eggert and Tim Parenti as coordinators. Because rules keep changing, our guides to when the clocks change and how daylight saving works are only right for a stated date range.

  1. 1927Warren Marrison and J.W. Horton build the first quartz clock at Bell Labs.
  2. 1955Essen and Parry's caesium clock begins operating at the National Physical Laboratory.
  3. 1967The 13th CGPM defines the second as 9,192,631,770 periods of caesium-133 radiation.
  4. January 1, 1972UTC takes its modern form, 10 seconds behind TAI; the first leap second follows on June 30.
  5. By 1985David Mills's Network Time Protocol is in operation (one source says 1981).
  6. September 2011Astrolabe sues the tz maintainers; ICANN takes over the database in October.
  7. December 31, 2016The 27th and latest leap second.
  8. 2022The 27th CGPM decides to widen the allowed UT1-UTC gap in or before 2035.

What comes next: the end of leap seconds and a better second#

Retiring the leap second#

In 2022 the 27th CGPM adopted Resolution 4, which resolved that the maximum allowed value of UT1 minus UTC will be increased in or before 2035. It asked the International Committee for Weights and Measures to propose a new maximum that keeps UTC continuous for at least a century, to plan its introduction by 2035 and to draft a resolution for the 28th CGPM in 2026. In practice the allowed gap grows, so no leap second is needed for a long time.

The 28th CGPM is convened from Tuesday, October 13 to Thursday, October 15, 2026, at Versailles, according to the BIPM's convocation. The BIPM's list of draft resolutions includes a Draft Resolution C on the technical actions required to ensure the continuity of UTC, dated January 13, 2026. The draft's full text was not available when this article was written.

There is a twist. Every leap second so far has added a second, because the Earth's days have on average been longer than 86,400 atomic seconds. Recently the planet has been spinning faster, and a 2024 presentation on gps.gov notes the possible need for a first negative leap second, which has never been foreseen or tested. According to AP coverage on PBS NewsHour, a 2024 study in Nature led by Duncan Agnew of the Scripps Institution of Oceanography estimated that one might be needed as soon as 2029, and that melting polar ice had put the date off by about three years. That is a forecast, not an event.

Optical clocks and the next second#

The second may change again. NIST says optical clocks, which use atoms such as ytterbium and strontium that oscillate about 100,000 times faster than the caesium microwave signal, are about 100 times more accurate and stable than caesium fountains. A BIPM presentation from October 2025 counts more than 50 optical standards at over 20 institutes, the best at one part in 10^18, which would take about 31.7 billion years to build up an error of one second.

Yet the second is still defined by caesium, and NIST says there is no consensus on which atom should define the next one. The BIPM's FAQ describes two steps at the CGPM, consideration (earliest 2026) and ratification (earliest 2030), and a 2025 CCTF recommendation says there is still no agreement between a single atom and an ensemble. The BIPM said in November 2025 that a draft resolution on it is on the 2026 agenda.

Checking your own clock#

The story ends with a practical question: is the clock in front of you right? Timelive's exact time page answers it with the same trick NTP uses. It asks Timelive's server for its time in milliseconds, times the round trip, and assumes the server read its clock halfway through. Half the round trip becomes the margin shown, so a 40-millisecond trip reads as ±0.020 s. The page then runs its clock from the corrected time and compares it with your device. How Accurate Is Your Phone or Computer Clock? How to Check and Fix It walks through the steps, the fallback when the server cannot be reached and how to read each verdict.

Be clear about what this does not tell you. The margin covers only the network part of the uncertainty, and "exact" on the page means within that margin of Timelive's server clock. Timelive does not certify an accuracy figure for its server clock and is not an official time source. If the exact time has legal or scientific weight, use your country's official time service. What the page can show is whether your phone or laptop is a fraction of a second out or a minute out.

Part one of this series began with shadows. Now the number in the corner of your screen comes from caesium atoms in laboratories, averaged by the BIPM, broadcast by satellites, relayed by servers in layers and mapped to local clocks by a database that volunteers keep up to date. The Sun no longer sets the second. For now it still sets the day, which is why leap seconds, and the argument over ending them, exist.

Frequently asked questions

How do atomic clocks work?

An atomic clock uses atoms as a reference for an electronic oscillator. In a caesium clock, a microwave signal is aimed at caesium-133 atoms, which react most strongly when its frequency is exactly right. The clock adjusts the oscillator until it hits that peak, and counting the oscillator's cycles then counts seconds.

What is the definition of a second?

Since 1967 the SI second has been 9,192,631,770 periods of the radiation associated with the hyperfine transition of the caesium-133 atom. In 2018 the wording was revised, effective in 2019, to fix the caesium frequency at exactly 9,192,631,770 hertz without changing the length of the second.

What is the difference between UTC, TAI and GPS time?

TAI and GPS Time are continuous atomic time scales with no leap seconds. UTC runs at the same rate but is shifted by whole seconds so that it stays close to the Earth's rotation. As of October 9, 2026, TAI is 37 seconds ahead of UTC and GPS Time is 18 seconds ahead.

Why do we have leap seconds, and are they ending?

The Earth's rotation is irregular and slowing on average, so atomic time drifts away from the Sun's time. A leap second is added when the gap is predicted to approach 0.9 seconds. There have been 27, the last on December 31, 2016.

In 2022 the 27th CGPM decided to increase the allowed gap in or before 2035, which would end routine leap seconds. The 28th CGPM meets on October 13 to 15, 2026, so check the BIPM for the outcome.

How does my phone know the time, and what is NTP?

Many phones ask an internet time server using NTP, the Network Time Protocol. The phone sends a request, the server replies with its time, and four timestamps let the phone correct for the delay of the trip. From Android 12, Android prefers NTP and falls back to the mobile network's time message if NTP is unavailable. Servers sit in layers called strata, counted by how many steps they are from a reference clock.

Sources and further reading

  1. History of the SI second — BIPM
  2. Resolution 1 of the 13th CGPM (1967) — BIPM
  3. Resolution 4 of the 27th CGPM (2022): On the use and further development of UTC — BIPM
  4. All Days Are Not Created Equal — NASA JPL
  5. Milestones: First Atomic Clock, 1948 — Engineering and Technology History Wiki (IEEE)
  6. Fountains of atoms, exquisite timekeepers — NIST
  7. How and why the leap second affected Cloudflare DNS — Cloudflare
  8. USNO briefing on GPS time to the CGSIC, 2021 — GPS.gov, US Naval Observatory
  9. Time source priority — Android Open Source Project
  10. RFC 5905: Network Time Protocol Version 4 — RFC Editor, IETF
  11. In memoriam: David Mills, Network Time Protocol — University of Delaware
  12. Astrolabe v. Olson — Electronic Frontier Foundation