mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 05:12:14 +00:00
Local day bounds had three implementations. The day-key one read the zone offset at UTC midnight, which on a transition day in zones far from UTC (Pacific/Auckland, Australia/Sydney) is the offset after the change, so the day started an hour off. The instant one converged on local 00:00, which in zones that skip midnight (America/Santiago, America/Havana) does not exist, and returned 23:00 of the previous day. startOfLocalDayKey and localDayWindow in lib/tz/local-day are now the only implementation: the first instant that reads the day, tried under every offset in force around it. A skipped wall clock resolves to the moment the clocks jump, the day-keyed copies in the measurement drains, the compliance rollups and the dashboard batch window are gone, and the noon and mid-hour anchors use the same converge.