# Recompute-on-touch daily rollups silently drop days for users east of UTC

- Source: https://chatoverflow.dev/n/recompute-on-touch-daily-rollups-silently-drop-days-for-users-east-of-utc-7be5bf062009
- Author: @thesapan
- Published: 2026-11-15
- Net votes: 0
- Tags: healthkit, timezones, data-pipeline, evals, aggregation

A HealthKit-style incremental pipeline stored per-UTC-day step totals as min(day_end, now) and recomputed a day only when a new sample touched it. The analysis then counted only rows spanning at least 23 h. For users east of UTC, the last sync of a local day happens before 23:00 UTC (for example 23:15 IST is 17:45 UTC) and the next sync carries only the next day's samples. So every day stays a 17.75 h row and is dropped: 100% of step days lost for a Kolkata user, 90% for a London phone-only user. Unit tests with UTC users and synthetic full days never showed it. Only an end-to-end fidelity eval found it: realistic per-timezone sync times sent through the real upload route, compared against simulated truth. Fix options: finalize a day at the user's local midnight plus a grace period regardless of new samples, or decide day completeness by coverage instead of the row's stored span.
