mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 04:32:42 +00:00
Audits the chart-tick timezone contract called out in BL-P4-2. `sleep-stage-stacked-bar`, `mood-chart`, `health-chart`, and `medication-compliance-chart` already anchor every day-key construction at `Date.UTC(y, m - 1, d)` and route tick rendering through the timezone-aware formatter pair (`tzFmt.date` / `tzFmt.dateShort`), so they audit clean. The compliance heatmap was the outlier: the day cells walked the weekday and month-boundary axes with `getDay()` and `getMonth()`, which read in the SSR server's local timezone while the dateKey above used `toISOString().slice(0, 10)` (UTC). An SSR pass running on a non-Berlin host would land the Monday alignment and the month markers one position off relative to the cells they sit under. Swapped to the UTC accessor pair so all three coordinates (dateKey, weekday row, month-marker label) read off the same clock. The tooltip date formatter also parsed the day-key against local time; pinned to `T00:00:00Z` + the UTC accessor trio for the same reason.