fix(sync): rollup-day month check lands in the wrong month at negative UTC offsets

rollup_day is a local epoch day, but the copy-vs-recompute guard read its
month back via day * 86400 (UTC midnight), which resolves to the previous
civil month for the 1st of a month anywhere west of UTC. Anchor at local
noon (+43200) instead. Pre-existing on main, surfaced by CodeRabbit review.
This commit is contained in:
2026-07-12 02:09:52 -07:00
parent 08419fbc8e
commit 25cca8ce24
2 changed files with 8 additions and 1 deletions
+4
View File
@@ -0,0 +1,4 @@
type: fixed
area: sync
- Fixed stats sync copying a remote daily rollup that should have been recomputed when the day was the 1st of a month and the machine was on a negative UTC offset (the Americas), which could leave that day's totals wrong after a sync. The rollup day is now read back at local noon instead of UTC midnight, so it always resolves to the correct civil month.