Repository navigation
fix: keep annotation markers on the right day in UTC+ browser timezones - #4649
Open
ChangkeunJ wants to merge 1 commit into
Open
ChangkeunJ wants to merge 1 commit into
ChangkeunJ wants to merge 1 commit into
Conversation
|
@ChangkeunJ is attempting to deploy a commit to the Umami Software Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryFixes annotation bucket lookup by reading date-only labels as local dates instead of UTC dates.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Need help on this PR? Tag
@codesmith-botwith what you need.