Skip to content

Chart X-axis timestamps show wrong timezone #49

@erikdarlingdata

Description

@erikdarlingdata

Problem

When using a custom time range in Lite (and likely Dashboard), the chart X-axis labels show timestamps in the wrong timezone. Setting the picker to 8:00 AM - 12:00 PM local time shows data plotted at 9:00 PM - 2:00 AM on the X-axis.

Root Cause (under investigation)

The data flow involves multiple timezone conversions:

  1. collection_time stored as DateTime.UtcNow (UTC) in DuckDB
  2. Chart data points converted with .AddMinutes(UtcOffsetMinutes) (server's UTC offset from DATEDIFF(MINUTE, GETUTCDATE(), GETDATE()))
  3. Picker dates converted via ServerTimeHelper.LocalToServerTime() (client local → server time)
  4. X-axis range set using the converted server time values

Something in this chain is producing incorrect axis labels. The offset appears to be roughly double-applied or not applied at all to the axis range vs data points.

Environment

  • Server UTC offset: -480 minutes (Pacific, UTC-8)
  • Client timezone: Pacific (same as server)
  • Picker set to: 08:00 - 12:00 on 2/15/2026
  • Chart shows: 9:00 PM 2/14 - 2:00 AM 2/15

Affects

Both Lite and Dashboard (both use the same UtcOffsetMinutes + ServerTimeHelper pattern for chart time conversion).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions