How we keep time

Three things have to be right for a time page to be right: the current instant, the rules of the time zone, and the calendar arithmetic. This page explains how each is done here.

The current instant: measuring your clock

A web page can only read the clock of the device it runs on. Phones and computers that synchronise automatically are usually within a tenth of a second of UTC, but many are off by seconds and some by minutes, especially virtual machines and devices with automatic time switched off.

When a page opens, it asks our server for the current time in milliseconds, up to five times. For each exchange it notes when the request left and when the answer arrived. The server’s reading was taken somewhere inside that round trip, so the difference between the server time and the midpoint of the round trip estimates your device’s offset, with a maximum error of half the round trip. We keep the fastest exchange, which usually bounds the error to a few hundredths of a second. This is the calculation NTP uses, reduced to one timestamp from the server (RFC 5905).

The clock then counts from the browser’s monotonic timer, which never jumps, plus the measured offset. It is checked again every 15 minutes, when you come back to the tab and when the connection returns. The line at the bottom of each page tells you the result, for example “your device is 1.2 s fast (±0.03 s)”; a result within the margin of error is reported as exact. Our server’s own clock is synchronised to UTC by its operating system. If the server cannot be reached, the page shows your device’s time and says so.

Leap seconds are not shown: like every computer clock, we follow Unix time, in which every day has 86,400 seconds. No leap second has been added since the end of 2016.

Time zone rules: our own copy of the IANA database

The IANA time zone database records the clock rules of every region since 1970, and is updated several times a year when governments change them. Browsers carry a copy inside their date libraries, but it can be a year old. In 2026 alone, British Columbia, Alberta, the Northwest Territories and Manitoba stopped changing their clocks, Morocco moved to permanent UTC+0, and Cuba cancelled its November change. An older browser still shows the old times for those places.

So the site ships its own table of every offset and abbreviation change from 2025 to 2030, compiled from IANA release 2026f (published 2026-10-27), and the current rule of each zone for the years after. Where they apply, these replace the browser’s answer; for dates before 2025 the browser’s historical data is used. The table is checked against Python’s zoneinfo on the same release for more than two thousand instants across 36 zones, including half-hour and 45-minute offsets, southern-hemisphere and negative daylight saving time.

Times that do not exist (the hour skipped when clocks go forward) are moved forward by the length of the gap, and times that happen twice (when clocks go back) are taken at their first occurrence; converters say so when it happens.

Today’s date without stale pages

A date is local: at any moment two calendar dates are in use somewhere on Earth. Pages are therefore never built with a fixed “today”. Our server writes the current date into each page as it sends it, for the place the page is about, or for your time zone when your network provider reports it and for New York otherwise. Your browser then recomputes every value for your own time zone as soon as it opens the page, and again every minute, so the date changes at your midnight even if the page stays open.

Calendar arithmetic

Dates are counted in the proleptic Gregorian calendar through the Julian Day Number, using the integer algorithm of Fliegel and Van Flandern as published by the US Naval Observatory. Week numbers follow ISO 8601: weeks start on Monday and week 1 contains the first Thursday of January; the US convention is shown alongside. “N days from today” counts today as day 0. Business days skip Saturdays and Sundays but not public holidays, which differ by country. Public holidays come only from official government sources for 2026 to 2028, and for 2025, 2029 and 2030 from the rule set in law; holidays that are announced each year are never guessed. The Islamic date follows the Umm al-Qura calendar of Saudi Arabia as tabulated in the Unicode ICU library; where a country follows moon sighting, its date can differ by a day.

Every calculation is tested against independent references: ISO weeks and day numbers against Python’s calendar functions for 33 years, Julian dates against published USNO values, Excel serials against Microsoft’s examples, and Hijri dates against the ICU table.

Tools and your data

Every tool on the site runs in your browser: converters, the world clock, the year and leap-year checkers and the date converters. Nothing you type is sent to our server. After a page loads, it asks us only for the time check, which sends no information beyond the request itself, and a page-view count for Umami, our cookieless visit statistics. A tool’s state is written into the page address, as in /weeks-in-a-year/?y=2032, so any result can be bookmarked or shared and opens the same way for someone else. Preferences such as dark mode, 12- or 24-hour time and your world clock cities are kept in your browser’s local storage, never in a cookie.

How the answers are tested

Two kinds of test run before every release. Unit tests check the calculations against independent references:

Browser tests then open the real pages with the clock set years ahead, for example to 2029 or 2031, and check that dates, the next leap year, weeks left in the year and tomorrow’s date have moved on correctly, including at midnight with the page open. They also check that pages do not overflow on narrow phones and that they meet WCAG 2.2 AA accessibility rules.

How the text is written

The explanations on each page are written for this site. Rules and history are stated only when an official or primary source supports them: the standard itself, a government or observatory publication, or the law. Those sources are listed on the sources page. Tables of years, months and weekdays are generated from the rules by the same tested code that powers the tools, so the text and the tools cannot disagree. Where a well-known claim could not be confirmed from a primary source, it is left out. Where the sources leave a question open, such as how a country counts a February 29 birthday in law, the page says so. Corrections are welcome at the address on the about page, and every correction is checked against the source before the page changes.

The full list of datasets and standards is on our sources page.