Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make rotation start and rotation end take timezone into consideration #4481

Merged
merged 28 commits into from
Jun 17, 2024

Conversation

teodosii
Copy link
Member

@teodosii teodosii commented Jun 6, 2024

What this PR does

  • Fixes Rotation Start and Rotation End to take selected offset into consideration
  • Fixed issue where week/month period was being restored when the offset was being changed (now it defaults to start of week, midnight, in selected timezone offset)

Related to #4428

@teodosii teodosii requested a review from a team June 6, 2024 12:45
@teodosii teodosii added pr:no public docs Added to a PR that does not require public documentation updates release:patch PR will be added to "Other Changes" section of release notes labels Jun 6, 2024
lint
@teodosii teodosii force-pushed the rares/fix-schedule-shifting-time-in-rotation branch from 88a2a25 to e42bc86 Compare June 6, 2024 12:59
Copy link
Contributor

@joeyorlando joeyorlando left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe worthwhile adding some unit tests for some of the time related utility functions, wdyt?

@brojd
Copy link
Contributor

brojd commented Jun 7, 2024

I can see the issue when you create Rotation that starts before / after DST change comparing to current time:

Screen.Recording.2024-06-07.at.07.01.41.mov

@brojd
Copy link
Contributor

brojd commented Jun 7, 2024

Another issue is that the day jumps to previous day if you select date that is before / after DST change:

Screen.Recording.2024-06-07.at.07.05.53.mov
Screen.Recording.2024-06-07.at.07.15.18.mov

@brojd
Copy link
Contributor

brojd commented Jun 11, 2024

I can see the following issues:

  1. I create rotation that starts before DST change (27th March) in my system timezone at 2:00 having GMT+2 offset selected (so start time is 00:00 UTC), then created rotation has start time 01:00 UTC:
Screen.Recording.2024-06-11.at.10.22.15.mov
  1. I create rotation that starts before DST change (27th March) in my system timezone having GMT+0 offset selected, then shifts are overlapping and "Limit each shift length" is enabled as soon as the rotation is created:
Screen.Recording.2024-06-11.at.10.26.47.mov
  1. When I have GMT+0 offset selected, then I navigate in calendar to some date that is after the DST change in my system timezone, then the default value for start/end date of rotation is moved back to 23:00 of the previous day:
Screen.Recording.2024-06-11.at.10.33.18.mov
  1. The rotation preview misses the last day of the week / month:
Screen.Recording.2024-06-11.at.01.43.40.mov

@teodosii
Copy link
Member Author

Tests will be added separately as there's quite many cases to be handled and verified. before dst/during dst/after, switching from one period to another, changing the timezone etc

@teodosii teodosii requested a review from brojd June 14, 2024 12:55
@teodosii teodosii changed the title Fix schedule shifting time when changing the rotation for a different timezone than system's Make rotation start and rotation end take timezone into consideration Jun 14, 2024
@teodosii teodosii force-pushed the rares/fix-schedule-shifting-time-in-rotation branch from 6438aa1 to ad05205 Compare June 14, 2024 13:49
@teodosii teodosii enabled auto-merge June 17, 2024 13:06
@teodosii teodosii added this pull request to the merge queue Jun 17, 2024
Merged via the queue into dev with commit 46629e2 Jun 17, 2024
21 checks passed
@teodosii teodosii deleted the rares/fix-schedule-shifting-time-in-rotation branch June 17, 2024 13:39
brojd pushed a commit that referenced this pull request Sep 18, 2024
…#4481)

# What this PR does

- Fixes Rotation Start and Rotation End to take selected offset into
consideration
- Fixed issue where week/month period was being restored when the offset
was being changed (now it defaults to start of week, midnight, in
selected timezone offset)

Related to #4428
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:no public docs Added to a PR that does not require public documentation updates release:patch PR will be added to "Other Changes" section of release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants