Our Sunrise Times Were 82 Seconds Off — Here's How We Found Out and Fixed It
See what this means where you live
Choose a place and an optional date for sunrise, sunset, golden hour, and twilight. Leave the date blank for today.
If you looked up a sunset time on this site before today, it was about 82 seconds late.
Not wildly wrong. But wrong in a consistent direction, on every page, for as long as the site has existed — and we only found it by accident while building something else. This article explains what went wrong, whether a minute and a half is enough to matter for what you’re doing, and what we now do to make sure it stays right.
We could have fixed it quietly. Publishing it seems more useful: if you’re going to rely on these numbers, you should know how they’re checked and who checks them.
Does a minute and a half actually matter?
For most people looking up “what time is sunset,” honestly, no. If you want to know whether to bring a jacket to an evening walk, 82 seconds is noise.
But for some of the reasons people come here, it isn’t:
- Photography. Blue hour — the even, deep-blue light after the sun is properly gone — lasts roughly 20 to 30 minutes at mid-latitudes. A minute and a half is about 5% of your entire window, and it’s the end you’re most likely to miss because you were waiting on a time that hadn’t arrived yet.
- Hunting and fishing. Legal shooting and fishing hours are often written as a fixed offset from sunrise or sunset — “30 minutes before sunrise” and so on. If your reference time is late, your legal window is late too. That is the one case where we would tell you not to rely on any website, including this one: use your state’s published tables. We wrote about how legal light is actually defined if you want the detail.
- Flying. Civil twilight is what separates day from night for a number of aviation rules, and pilots log time against it.
- Astronomy. If you’re waiting for true darkness, errors accumulate across the twilight phases rather than cancelling out.
- Solar panels, gardening, which way your windows face. Here a minute is genuinely irrelevant. The seasonal pattern is what matters, and that was never affected.
So: a small error, but not a harmless one for everybody. Worth fixing, and worth being honest about.
What “sunrise” even means
Before the mistake itself, one thing worth knowing, because it puts the 82 seconds in perspective.
A published sunrise time is not a measurement. It is a prediction from a model, and the model makes assumptions that are never exactly true where you’re standing:
- It assumes the atmosphere bends light by a standard amount. Real refraction varies with temperature and pressure, which can shift sunrise by a minute or more on an unusual day — nobody can predict that from your coordinates alone.
- It assumes a flat, unobstructed horizon at sea level. If you live in a valley, the sun disappears behind the ridge well before the “official” time. This can be tens of minutes in mountain country, and it’s the single largest source of disagreement between a published time and what you actually see.
- It reports the moment the sun’s upper edge touches that imaginary horizon, not when the light changes in any way you’d notice.
We go into all of that in how accurate are sunrise and sunset times. The short version: a sunrise time is accurate to about a minute in principle, so an 82-second systematic error was large enough to matter relative to the honest uncertainty. It was eating most of our accuracy budget for no reason.
What was wrong
The calculation works in two steps. First it finds solar noon — the moment the sun is highest. Then it measures outwards from noon to find when the sun passes the height that counts as sunrise and sunset.
The first step was slightly late. And because everything else was measured from that moment, the entire day shifted with it: sunrise late, sunset late, twilight late, golden hour late.
You can see the fingerprint of that if you look at it the right way. When we checked where the sun actually was at the moment our old code claimed “sunset,” it was already too far below the horizon. At the moment it claimed “sunrise,” it was too far above. Both are what you’d expect if the clock, not the astronomy, had slipped — and the two errors averaged out to exactly the right answer, which is the giveaway that a single time offset was to blame rather than anything about the sun.
The cause was a shortcut in the astronomy library we used. The gap between clock time and true sun time wanders through the year by up to about 16 minutes — the reason a sundial and your watch rarely agree, which we cover in the analemma and the equation of time. Approximating that wander is standard practice, but the approximation being used was a little too coarse: good to about a minute, not to a few seconds. Every time on the site inherited that.
The part we got wrong twice
Here is the bit we think is genuinely worth passing on, because it isn’t really about astronomy.
When we first tested the fix, we checked it against the US Naval Observatory and concluded we had eliminated the error entirely. We published that. It was wrong, for two reasons that are easy to fall into:
We asked the tool to check its own homework. Our fix used one part of the same library to correct another part of it. It agreed with itself beautifully. But that part carried its own small bias, so the corrected times were still around half a minute late — and we had no way of seeing that, because our referee was the thing being tested.
We used a reference that wasn’t precise enough for the claim. The Naval Observatory publishes times to the nearest minute. That is perfect for spotting “you’re about a minute out.” It cannot possibly confirm “we are now accurate to three seconds.” We used a minute-resolution source to support a seconds-level conclusion, and it obligingly appeared to agree.
There was even a warning sign in our own results: our sunsets kept reading one minute later than the Naval Observatory’s more often than chance allowed. We noticed it, wrote it down, and then talked ourselves into calling it a rounding quirk. It wasn’t. It was the remaining error, showing exactly where we’d told ourselves not to look.
A reader pointed this out after the first version of this article went up. They were right, and we redid the whole measurement.
How the numbers are checked now
Two changes came out of it.
We upgraded the astronomy. The library’s authors had already fixed the underlying shortcut in a newer version — released, as it happens, several weeks before we noticed anything. Moving to it removed the error at the source instead of patching over it.
We check against something completely separate. A regression sample of sun times is now compared against an independent astronomical engine built on different mathematics by different people. Across 16 sunrise and sunset events at 8 locations from Honolulu to Anchorage, spanning all four seasons, the two agree to about 1.8 seconds mean absolute error, seven seconds at worst.
That check runs as a command, not as a hope, and it fails loudly if anything drifts more than 15 seconds. The figures on our homepage are printed straight from its last run — we can’t leave a flattering number in there by accident, because the page reads the result file rather than a sentence somebody typed.
What this means for you
- Sunrise, sunset, solar noon, twilight and golden hour times on this site are now accurate to a few seconds against the standard definition, everywhere in the US.
- Day lengths were never affected. Because the whole day shifted together, the duration between sunrise and sunset stayed correct — so anything about how long a day is, or how the seasons change it, was right all along.
- Your local horizon is still the big unknown, and it dwarfs anything discussed here. If there are hills to your west, your real sunset is earlier than any website will tell you — often by far more than 82 seconds. We’re working on that next, and it’s a much more interesting problem.
If you ever find a number here that looks wrong, tell us. This article exists because someone did exactly that, and the site is more accurate because of it.
For the technically curious
The library was SunCalc 1.x. Its solar transit came from a two-term approximation of the equation of time, which ran 30–100 seconds late depending on the date; since rise and set were derived as transit ± hourAngle, all events inherited the shift. Measured against astronomy-engine with days aligned to the local calendar date, 1.9’s error was +82.3 s (range +46 to +164 s). SunCalc 2.0.0 replaced the approximation with an iterative solve; 2.0.1 measures +0.9 s (range −1 to +4 s) on the same sample.
Two traps for anyone repeating this. Our root-finding fix only reached +18.6 s mean (+35.8 s on sunsets) because 1.9’s own position function reads 0.06–0.22° high — tens of seconds at the horizon. And the Naval Observatory’s one-day API, queried at tz=0, returns the previous local evening’s sunset for anywhere whose sunset falls after 00:00 UT, which quietly flatters the comparison. Query in local time, or shift the date.
Validation update, September 27, 2026: the test now covers 14 location/date pairs at 10 locations, including both daylight-saving transitions and polar day/night. The homepage reports mean absolute error; the earlier signed mean could cancel early and late errors.