How we compute times
Every time, date, sunrise and moon phase on 123Clock.online is calculated when you open the page, from public reference data; none of them is typed in by hand. This page sets out where each answer comes from, how accurate it is and how the data is kept current.
The current time
Our server checks its own clock against Cloudflare’s public NTP service, and checks again whenever the last check is more than five minutes old. When a page opens, your browser asks our server for the time several times, keeps the answer that came back fastest and allows for the time it spent on the network. The clocks on the page then run from that corrected time rather than from your device’s clock, and the page tells you how far your device is off and how precise the reading is.
Time zones and daylight saving time
UTC offsets, daylight saving time rules and the dates clocks change all come from the IANA Time Zone Database, the record of every time zone’s rules and history that computers, phones and browsers around the world rely on. When a government changes its clocks, a new edition is published, and our server installs it automatically with its regular system updates. Clocks that tick in your browser use your browser’s own copy of the same database. Our server is using edition 2026f.
Places
The 235,064 places come from GeoNames, an open database of the world’s places: every town and city it lists with more than 500 people or that is a seat of local government, plus a few smaller settlements that are the only one in their time zone. Each place’s coordinates, population, country, time zone and names in other languages come from GeoNames.
Sunrise, sunset and twilight
Sunrise and sunset are calculated for each place’s coordinates with Paul Schlyter’s method for sunrise and sunset. They are the moments the top edge of the Sun meets a level horizon, allowing for the way the atmosphere bends its light. Civil, nautical and astronomical twilight begin and end when the centre of the Sun is 6°, 12° and 18° below the horizon. The results are good to within a couple of minutes; hills, tall buildings, height above sea level and unusual weather can all change what you actually see.
The golden hour is the time the centre of the Sun is between 6° above and 4° below the horizon, and the blue hour the time it is between 4° and 6° below, worked out with the same method. Neither has an official definition: these are the limits photographers use most.
The Moon
The Moon’s position, its phase and how much of it is lit come from Paul Schlyter’s widely used low-precision formulas. Moonrise and moonset are found by following the Moon’s height through the local day and noting when it crosses the horizon. These times are good to within a few minutes: right for planning an evening, not for navigation.
The moments of new moon, first quarter, full moon and last quarter are worked out separately, with Jean Meeus’s method from Astronomical Algorithms (chapter 49), and agree with the published almanacs to the minute. The moon phase pages print them in UTC.
Solar eclipses
Each solar eclipse is worked out from its Besselian elements, the numbers NASA and other eclipse calculators publish to describe the Moon’s shadow through the eclipse. From them come, for any place, the moments the eclipse begins and ends, how much of the Sun is covered and how long totality lasts, by the same method NASA’s own eclipse calculator uses. Checked against it for hundreds of places, the times agree to the second and the share of the Sun covered to a hundredth of a percent; the time, magnitude and longest totality of each eclipse agree with NASA’s tables too. The times allow for the Sun rising or setting during the eclipse, but not for hills or buildings on the horizon, or for the height of the place, which near the edge of a path can change totality by a second or two.
Lunar eclipses
Each lunar eclipse is worked out from the elements of NASA’s lunar eclipse calculator, by Fred Espenak and Jean Meeus: the seven moments the eclipse is made of, which are the same for everyone, and where the Moon is in the sky through it. A place sees whatever happens while the Moon is above its horizon, counted from the moment the Moon’s upper edge rises, as this site’s moonrise times are. Checked against NASA’s calculator for hundreds of places, the Moon’s height agrees to a ten-thousandth of a degree; the time of greatest eclipse agrees with NASA’s catalog to the second, and the length of each phase to the tenth of a minute the catalog gives. A penumbral eclipse counts as seen only where the Moon is up at its middle: the rest of it is too faint to notice.
Equinoxes and solstices
The moments of the equinoxes and solstices follow the method in Jean Meeus’s Astronomical Algorithms, converted from the astronomers’ Terrestrial Time to UTC, and are good to within a minute or two.
Calendars and date calculators
Calendars and date calculations use the Gregorian calendar. Week numbers follow ISO 8601, in which weeks run from Monday and week 1 is the week containing the year’s first Thursday. The business days calculator leaves out the weekend days you tick (Saturday and Sunday unless you choose others) and the holidays you enter, which a country’s public holiday page can fill in for a year; the time calculator reads both moments as UTC, so it does not allow for clock changes.
The work hours calculator reads each day’s times as clock times on no particular date: an end at or before the start is on the next day, and a clock change during a shift is not allowed for. Decimal hours are the minutes divided by 60, rounded to two places, and pay is worked out from the exact minutes.
Public holidays
The Public holidays come from each government’s own published lists and laws, linked on every country’s page. The dates are worked out with the open-source python-holidays library, corrected wherever the official sources say otherwise, and compared with a second source, Nager.Date; where the two disagree, the official source decides. Islamic holidays wait on a sighting of the moon, so until a government announces them their dates are marked as expected and may move by a day. The lists are checked again every year, and each country’s page gives the date of the last check.
The page that says what day it is takes the date from your device’s clock, corrected by the same check as the clocks, in your own time zone. Its Julian date is the last two digits of the year followed by the day of the year, the form used on food packaging. Its Julian Day Number is the astronomers’ count of days from noon UTC on 1 January 4713 BC, worked out with Fliegel and Van Flandern’s formula.
Names and formats
Dates, times and numbers are written the way each language writes them, following the Unicode Common Locale Data Repository (CLDR), which is also where full time zone names such as “Central European Standard Time” come from.
Found a mistake?
Write to [email protected] with the address of the page and what you expected to see, and we will check it against the sources above.
The license and attribution for each source are on our Licenses page.
How the site is written and checked, and how we use AI, is set out in our Editorial policy.
123Clock.online is made and run by Digili Pte Ltd, a company based in Singapore.