Skip to content

Stats page: chart range doesn't match time selector; timezone ignores user preference #119327

Description

@billyvg

Summary

The Stats page has two related timezone/date range display bugs:

  1. Chart range doesn't match time selector — The time picker shows one range (e.g. Jun 10, 04:00–10:00) while the chart x-axis renders a different range (Jun 10 08:00–15:00 -04:00). The URL params (start/end) appear to encode UTC times, but the chart and selector apply timezone offsets inconsistently.

  2. Chart timezone label is static — The timezone offset displayed in the date range label below the chart (e.g. -04:00) appears hardcoded and does not reflect the user's account timezone preference.

Reproduction

  • Navigate to /settings/stats/?dataCategory=errors&start=2026-06-10T08:00:00&end=2026-06-10T14:00:59&project=...
  • Observe: time selector shows Jun 10, 04:00–10:00; chart x-axis shows Jun 10 08:00–15:00 (-04:00)
  • Change account timezone preference → chart timezone label remains unchanged

Observations

  • URL encodes start=2026-06-10T08:00:00 / end=2026-06-10T14:00:59 (no timezone suffix — likely treated as UTC)
  • Selector interprets these as local/offset times → shows 04:00–10:00 at -04:00
  • Chart renders them as local times anchored at the raw value → shows 08:00–15:00 at -04:00
  • The -04:00 offset in the chart label does not update with user timezone settings

Suspected root cause

Likely a mismatch between how the time selector component and the chart component each parse the URL start/end params — one applies a UTC offset, the other does not. The static timezone label suggests user preferences are not wired into the stats date range display. Confidence: medium.

--

View Junior Session in Sentry

Metadata

Metadata

Assignees

No one assigned

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions