Skip to content
theclock

About TheClock

A fast, private set of time tools that tells you the exact time.

How the exact time is measured

Device clocks drift and are often seconds — sometimes minutes — wrong. When you open the site, your browser asks our server for the current time five times. For each request it measures the round-trip time with the browser’s high-resolution monotonic timer and assumes the reply was created halfway through. The sample with the shortest round trip is kept, because it has the smallest possible error: half its round-trip time, shown as “± ms” under the clock.

Between synchronizations the clock advances using the monotonic timer, which is unaffected by changes to your system clock. It resynchronizes every 15 minutes, whenever you return to the tab after a while, when your connection comes back, and when it detects that your device slept.

Our server’s clock is synchronized by its hosting provider using NTP, typically to within a few milliseconds of UTC. That makes the displayed time very accurate for everyday use, but it is not a certified atomic-clock reference, and we don’t claim it is.

Time zones and daylight saving

All time zone and daylight saving calculations use the IANA time zone database built into your browser (through the JavaScript Intl API). Nothing is hardcoded, so rule changes arrive with browser updates. If your browser is very old, recent rule changes may be missing.

Cities, sunrise and sunset

The city list (about 7,300 places) comes from the open city-timezones dataset, derived from Natural Earth populated places, with an IANA time zone for each. Sunrise, sunset and twilight are calculated in your browser with the SunCalc library from each city’s coordinates; expect accuracy of about a minute.

Timers and alarms

Timers, countdowns and the stopwatch calculate from timestamps, so they never drift. Alerts are scheduled with a background-safe timer, but web pages cannot run when the browser is closed, and phones may pause background tabs. Keep the page open for alerts to sound.

Questions about privacy? Read the privacy policy.