Skip to content

Conversation

@briangregoryholmes
Copy link
Contributor

@briangregoryholmes briangregoryholmes commented Jan 16, 2026

Annotations were being incorrectly placed and labeled on timeseries charts because they didn't account for the dashboard timezone. See #8633 for discussion of a similar issue.

The problem was here:

let startTime = new Date(annotation.time as string);

This converts a UTC ISO timestamp into a JS Date using the local timezone, so all subsequent label generation and date transformations happened in local time rather than the selected dashboard timezone.

The fix passes dashboardTimezone through from the explore state and uses DateTime.fromISO() with that timezone, then converts to a JS Date using setZone(localTimezone, { keepLocalTime: true }) so the annotation renders at the correct visual position.

Example: Viewing a dashboard set to UTC with a local system in New Delhi, an annotation timestamped 2025-06-22T08:00:00Z rendered like this on 0.78:

before

After the fix:

after

Comprehensive tests will be added in a follow-up PR.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants