How we calculate sunrise and sunset
We calculate solar events from the selected city-center latitude and longitude using SunCalc, then show each event in that city’s IANA time zone. The selected date is the local calendar date, including daylight saving changes.
Times are rounded to the nearest minute. Elevation, terrain, buildings, atmospheric conditions and your exact location can change the sunrise or sunset you observe. If a calculation has no event or fails, the tool shows an explanation instead of a time.
The initial cities are San Diego, San Francisco, New York, Chicago, Las Vegas and Portland, Oregon. We do not use your device location.
For each selected local date, the calculation finds the solar events at that city’s representative center point. We format those instants in the city’s IANA time zone rather than applying one fixed UTC offset. This matters around daylight saving transitions: the clock offset can change while the Sun’s position changes continuously. The calendar calculates each date separately, so a month spanning a clock change can show different offsets.
Daylight length is the elapsed interval between the calculated sunrise and sunset events. All displayed event times are rounded to whole minutes. The month table is intended for comparing dates, not for reconstructing a second-by-second astronomical record. The date picker accepts calendar dates from 1900 through 2100; invalid dates show an explanation instead of a fabricated time.