Clock drift check

Your device keeps its own time, and it’s rarely exact. This page measures the gap against our reference clock and tells you whether it’s big enough to cause trouble.

Reference time

--:--:--

 

This device

--:--:--

Comparing clocks…

Your browser requests the time from our server five times in a row and keeps the exchange that came back fastest. The server clock is kept in step with atomic clocks over NTP. Only timestamps are exchanged and nothing is stored.

Why a device clock wanders

Inside every computer and phone, a small quartz crystal vibrates at a known rate and a counter turns those vibrations into seconds. The crystal is cheap and sensitive to temperature, so a typical device left to itself gains or loses a second or two a day. After a month with no correction, that’s a full minute.

To avoid that, devices ask a time server for the right time at regular intervals, using a protocol called NTP. Sometimes the correction stops, because a setting got switched off, a network blocks it or somebody set the device by hand. Then the error grows quietly, and the first you hear of it is a service that depends on the time turning you away.

ErrorWhat starts to fail
About 30 secondsSix-digit codes from an authenticator app. They’re computed from the current time in 30-second steps, and servers only tolerate a step or so on either side.
5 minutesLogins on Windows office networks. Kerberos, the system behind them, rejects tickets when clocks differ by more than five minutes.
A day or moreHTTPS everywhere. Certificates are valid between two dates, and a device living in the wrong month sees them all as expired or not yet valid.

How the measurement is made

Ask a server what time it is and the answer is already old when it reaches you. NTP has a fix for that, and we borrow it: time the round trip and assume the reply spent half of it traveling.

Say your browser sends a request when your clock reads 12:00:00.000. The reply comes back 80 milliseconds later and says the server time was 12:00:02.540. At the midpoint of the trip your clock was at 12:00:00.040, so it’s 2.5 seconds behind, give or take 40 milliseconds.

The page sends one request and throws it away, since the first one pays for opening the connection. Then it sends five more, one after the other, and keeps the one with the shortest round trip, because a fast exchange leaves the least room for error. The result shows the offset, the accuracy (half of that best round trip) and the time zone your device reports.

Reading the verdict

Right
The gap is under half a second, or too small to tell apart from the measurement error.
Right, within a few seconds
Up to 5 seconds. No service will notice.
Ahead or behind, shown as a warning
Between 5 and 30 seconds. Nothing breaks yet, but a synchronized device doesn’t drift this far, so automatic time is probably off.
Ahead or behind, shown as an error
30 seconds or more. The message names what’s at risk at your level of drift.

When the gap is within two minutes of a whole number of hours, the page adds a note about the time zone. What usually happened is that someone set the displayed time by hand while the device was configured for another zone. The clock looks right on screen and the time underneath is hours off.

The comparison is only as good as the path to our server. On a slow or uneven connection, such as a satellite link or a busy mobile network, the request and the reply may not take the same time, and the stated accuracy is then optimistic. If the accuracy figure is more than a few tenths of a second, measure again.

Putting the clock back on time

Don’t type the right time in by hand. It’ll be wrong again in a few weeks. Turn automatic synchronization on and force one update:

SystemWhere
Windows 10 and 11Settings, Time & language, Date & time. Switch on “Set time automatically” and “Set time zone automatically”, then press “Sync now”. From an administrator prompt: w32tm /resync.
macOSSystem Settings, General, Date & Time. Switch on “Set time and date automatically”.
iPhone and iPadSettings, General, Date & Time, “Set Automatically”. If the switch is locked, a Screen Time restriction or a device management profile is holding it.
AndroidSettings, System, Date & time, “Set time automatically”. Samsung puts it under General management.
Linux with systemdtimedatectl set-ntp true, then timedatectl status should report “System clock synchronized: yes”.

If the drift comes back, something is causing it. A desktop or old laptop that loses hours every time it’s unplugged has a dead clock battery on the motherboard, usually a CR2032 coin cell that costs next to nothing to replace. A computer that boots both Windows and Linux can jump by exactly your UTC offset at every switch, because the two systems disagree on whether the hardware clock stores local time or UTC. Guest and hotel networks sometimes block NTP (UDP port 123), and in that case the clock corrects itself on another network.

Questions people ask

Why are my authenticator codes not working?

Most often the phone’s clock is off by more than about 30 seconds. The codes are derived from the current time, so the phone and the server have to agree. Turn on automatic time on the phone, then try a fresh code.

How accurate is this clock check?

On an ordinary broadband connection, within a few hundredths of a second. The page shows its own margin after each measurement, which is half the round trip of the fastest of five exchanges with our server.

Why is my computer clock wrong every time I turn it on?

A small battery keeps the clock running while the computer is off. Once it’s dead, the clock resets or drifts badly at each power cut. Replacing the coin cell on the motherboard fixes it. Until then, automatic time will correct the clock once the system is online.

My clock is off by exactly one hour. What is wrong?

That points to the time zone or the daylight saving setting rather than the clock itself. Turn on automatic time zone, or pick the right zone by hand, and let the system set the time.

Does a wrong time zone break two-step codes?

Not by itself. Codes are computed from universal time, which is the same everywhere. You get into trouble when the displayed time was adjusted by hand to look right in the wrong zone, because that shifts the universal time underneath by hours.