Skip to content

fix: keep annotation markers on the right day in UTC+ browser timezones - #4649

Open
ChangkeunJ wants to merge 1 commit into
umami-software:devfrom
ChangkeunJ:fix-annotation-bucket-timezone
Open

ChangkeunJ wants to merge 1 commit into
umami-software:devfrom
ChangkeunJ:fix-annotation-bucket-timezone

Conversation

@ChangkeunJ

@ChangkeunJ ChangkeunJ commented Oct 20, 2026 •

Copy link
Copy Markdown

The fix for #4545 moved annotation storage and display to the app timezone, but the marker lookup in getChartBucketIndex still reads bucket labels with new Date('yyyy-MM-dd'), which lands on UTC midnight. The time scale parses the same label as local midnight, so for browsers east of UTC the lookup picks the previous bucket and day, month and year markers print one step early, even with the app timezone left at its browser default.

This adds getChartBucketTime, which parses a bucket the way the scale does, and Chart.tsx now parses the bucket list once per layout instead of once per annotation. New tests cover raw timestamps and local day and month matching across Asia/Seoul, Europe/Copenhagen, UTC and America/Los_Angeles.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@vercel

vercel Bot commented Oct 20, 2026

Copy link
Copy Markdown

@ChangkeunJ is attempting to deploy a commit to the Umami Software Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Fixes annotation bucket lookup by reading date-only labels as local dates instead of UTC dates.

  • Annotation markers line up with the chart’s local-time buckets.

No actionable issues were found. Tests and browser checks were not run.

Reviews (1) · Last reviewed commit: "fix: keep annotation markers on the righ..." · Reviewed by Greptile

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant