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

Timezone bugfixes #623

Merged
merged 18 commits into from
May 20, 2024
Merged

Conversation

SijmenHuizenga
Copy link
Collaborator

@SijmenHuizenga SijmenHuizenga commented May 4, 2024

Cross-timezone scheduling was broken. This is an attempt to fix that. To make sure this actually works in all cases, I've added a bunch of unit tests based on edge cases and reported issues. Furthermore I've split up the code a bit more to make it easier to understand and document. In this process I discovered more weird edge cases, which are now described as test cases.

Resolves #608 and #609 and #605 and #603

Everyone is invited to take a look and find more bugs / untested edge cases. Suggestions are welcome! I will leave this PR open until Saturday, after which I will merge & make a new release.

Todo:

  • Add tests from examples in daylight saving bug #608
  • Add tests for exotic timezones
  • Add test that covers a full year of daylight saving time changes, both local timezone and remote timezone
  • Add test for schedules that skips over daylight saving time changes, both local and remote
  • Add tests for situations where both local and remote timezones experience daylight saving time changes between now and the next scheduled event
  • Add separate tests for _move_to_next_weekday
  • Add separate tests for _align_utc_offset

@coveralls
Copy link

coveralls commented May 5, 2024

Coverage Status

coverage: 99.221% (-0.3%) from 99.474%
when pulling 252d451 on SijmenHuizenga:timezone-fixes
into 4386f45 on dbader:master.

@SijmenHuizenga SijmenHuizenga marked this pull request as ready for review May 13, 2024 09:11
@SijmenHuizenga SijmenHuizenga merged commit 2dcb583 into dbader:master May 20, 2024
17 checks passed
@SijmenHuizenga SijmenHuizenga deleted the timezone-fixes branch May 20, 2024 11:05
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.

daylight saving bug
2 participants