NewsCrawler.org

A Chromium Bug Caused by a 25-Hour Day

Some regions have calendar days with 23 or 25 hours, because clocks switch between daylight saving time and standard time. Local time equals UTC[1] plus a time zone offset. For example, Vancouver's standard time is UTC-8, but under daylight saving time[2] it becomes UTC-7. British Columbia stopped switching back to standard time on March 2, 2026, while Ontario and Washington State continue to switch.

The author describes a bug in Chromium, an open-source browser project led by Google that underlies Google Chrome, Microsoft Edge, and Opera. The bug comes from assuming that a day always has 24 hours. A scheduler in the device statistics code calculated the next allowed run as the last run plus base::Days(1), which is 86,400 seconds. On a 25-hour day, this time fell on the same day, so the timer fired immediately, and this repeated.

The fix idea is to calculate midnight of the next calendar day instead of adding a fixed 24 hours. Chromium fixed the problem with a patch that adds 4 hours before rounding down to midnight. The author calls this approach unusual and asks whether the bug is actually fixed.

Read the original ramsayleung.github.ioDiscussion

Sources

Published: First seen: Читать по-русски

Open as a page