Skip to content

Fix folded time#145

Open
sbquinlan wants to merge 3 commits intozslayton:masterfrom
sbquinlan:codex/fix_folded_time
Open

Fix folded time#145
sbquinlan wants to merge 3 commits intozslayton:masterfrom
sbquinlan:codex/fix_folded_time

Conversation

@sbquinlan
Copy link
Copy Markdown
Contributor

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.

@sbquinlan
Copy link
Copy Markdown
Contributor Author

sbquinlan commented Mar 9, 2026

Stacked on #148

@sbquinlan sbquinlan force-pushed the codex/fix_folded_time branch from 5516540 to 26301ca Compare April 6, 2026 10:32
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.

1 participant