Open
Conversation
Contributor
Author
|
Stacked on #148 |
3a770f5 to
5516540
Compare
5516540 to
26301ca
Compare
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.
There's a bug in the cron crate: When hourly and sub-hourly schedules go through the a "fall-back" DST transition they skip an hour of times that should trigger.
For example, when PDT falls-back to PST, 2:00 am is repeated once in each time zone. Daily schedules (e.g. "0 2 * * *") would expect to be triggered only once during a fallback, but hourly (e.g. "0 * * * ") and sub-hourly (e.g. "/15 * * * *") would expect to be triggered for each occurrence of the duplicated hour (or whatever the daylight savings time offset is).
This PR adds that behavior to make this crate inline with other cron implementations. I added tests to confirm the correct behavior that was previously uncovered in tests.