fix: Calendar timezone day-shift bug (#7048)#10459
Merged
ArtyomSavchenko merged 1 commit intohcengineering:developfrom Jan 29, 2026
Merged
fix: Calendar timezone day-shift bug (#7048)#10459ArtyomSavchenko merged 1 commit intohcengineering:developfrom
ArtyomSavchenko merged 1 commit intohcengineering:developfrom
Conversation
|
Connected to Huly®: UBERF-15325 |
ArtyomSavchenko
requested changes
Jan 29, 2026
a496e05 to
2ee6bfe
Compare
Contributor
Author
|
Thank you for the feedback @ArtyomSavchenko. I've cleaned up the PR:
The PR now contains a single commit with just the Apologies for the messy initial submission - I'll be more careful to keep PRs focused going forward. |
Events scheduled for today were appearing in tomorrow's column due to raw millisecond arithmetic not handling timezone transitions properly. Changes: - Replace MILLISECONDS_IN_DAY * day arithmetic with Date.setDate() - Fix mutation bug where date parameter was being modified - Use proper calendar day arithmetic that handles DST/timezone Tested in Brisbane timezone (GMT+10) - events now display in correct column. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Dominic O'Carroll <99632940+domocarroll@users.noreply.github.com>
2ee6bfe to
353de06
Compare
ArtyomSavchenko
approved these changes
Jan 29, 2026
Member
Thank you again for your contribution and for quickly addressing the feedback. |
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.
Summary
Fixes #7048 - Calendar events appearing shifted by one day.
Problem
Events scheduled for today were appearing in tomorrow's column. The
toCalendarfunction inDayCalendar.svelteused raw millisecond arithmetic (MILLISECONDS_IN_DAY * day + date.getTime()) which doesn't handle timezone transitions properly when combined withsetHours().Solution
Date.setDate()for proper calendar day calculationsdateparameter was being modified directlyChanges
Testing
🤖 Generated with Claude Code