How we keep time
A clock is only worth looking at if you can trust it. This page explains how localtime.now keeps its clocks right, where every time zone rule and fact on the site comes from, and how to tell us when something is wrong.
The clock
Your device’s clock is never trusted. Every page leaves our server with the current time already written into it, so the clock is right before any script runs. Your browser records when it sent the request and when the answer arrived, which tells the page how long the time took to reach you.
The page then asks our server for the time three more times and keeps the answer with the shortest round trip: the one least delayed by the network. The result is usually accurate to a few hundredths of a second. Under the clock, the page tells you how far your own device’s clock is off.
From then on the clock runs on your browser’s steady internal timer, which changing the device’s clock cannot move. It syncs again every 15 minutes and whenever you come back to the tab. If your computer sleeps, the clock notices when it wakes and syncs at once.
Time zones and daylight saving time
Time zone and daylight saving rules come from the IANA time zone database, the shared record of every region’s clock history that phones, computers and programming languages also use. Our server applies the rules when it builds each page, so a page always shows the rules in force today.
Your browser carries its own copy of those rules, and it can be years old. Every clock on the site carries the server’s UTC offset; if your browser disagrees with it, the clock follows the server and asks it when the next clock change will be.
When a government decides to change its time zone or its daylight saving rules, we report it on Time zone news, with links to the sources. A person checks every story before it is published.
Places, sun and moon
Cities, their coordinates and their populations come from GeoNames, licensed under CC BY 4.0.
Sunrise, sunset, twilight, the moon’s phases and the solstices are calculated for each place from its coordinates, with the formulas in Jean Meeus’s Astronomical Algorithms. Our tests check them against an independent ephemeris (PyEphem). Times are shown to the minute.
The borders on the time zone map come from timezone-boundary-builder, based on OpenStreetMap data (ODbL).
Public holidays
Public holidays come from the open-source holidays library, which follows each country’s laws. A holiday whose date depends on the moon or on an official announcement is marked “estimated” until it is confirmed. Holiday names in other languages come from the same library and from Wikidata.
Weather
The weather on the live world display comes from MET Norway.
Corrections
If you find something wrong, write to hello@localtime.now with the address of the page. We check every report against the sources above and correct confirmed errors.
Every correction and data update is listed in the changelog.
Read more about localtime.now, or follow us on YouTube and X.