mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
`measured_at` and `scheduled_for` are naive UTC timestamps. The dashboard streak and the medication-compliance backfill keyed them with a single `AT TIME ZONE tz`, which reads the value as local time and shifts it the wrong way: in Berlin a reading at 23:30 UTC counted for the day before instead of the day after, so a streak could break or stretch near midnight and the backfill recomputed the wrong day. The streak's measurement days now come from `readActivityDayKeys`: one existence probe per local day instead of a DISTINCT over a year of readings. The DAY rollups cannot answer this because their buckets are UTC days. The two compliance-rollup readers had no caller left and are removed with the coverage probe that carried the same shift. A guard fails on any single shift of a naive column into a bound zone.