You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bucketStart() in packages/core/src/time.ts takes a timeZone but only applies it to day buckets. The 'hour' case is Math.floor(ts / HOUR) * HOUR, which is UTC-aligned. So on a site whose zone has a half-hour offset (Asia/Kolkata, Asia/Tehran, Australia/Adelaide) the hourly timeseries buckets land 30 minutes off the local clock, and the range snapping in query.ts resolve() is off by the same amount.
Repro: bucketStart(Date.parse('2026-05-10T13:47:00Z'), 'hour', 'Asia/Kolkata') returns 2026-05-10T13:00:00Z, but the local hour that contains that instant is 19:00 IST, which starts at 2026-05-10T13:30:00Z. queryTimeseries() then returns hourly points at :30 past every local hour.
Fix: align the 'hour' case to the zone the same way startOfDay already does (shift by tzOffsetMinutes, floor to the hour, subtract the offset at the boundary back out). Minute buckets are fine as they are, because every zone offset is a whole number of minutes. nextBucket stays bucket + HOUR; for whole-hour zones that is still exact across DST, since the offset changes by a whole hour on an hour boundary.
Activity
Align hour buckets to the site time zone (#7)