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

DST change causes panic #38

Open
codifryed opened this issue Apr 7, 2024 · 0 comments
Open

DST change causes panic #38

codifryed opened this issue Apr 7, 2024 · 0 comments

Comments

@codifryed
Copy link

Hi there,

I'm using a default Scheduler to trigger jobs at regular intervals, pretty standard, but when the timezone says it's time to move into winter time, aka when the clock moves back an hour, this happens:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', .cargo/registry/src/index.crates.io-6f17d22bba15001f/clokwerk-0.4.0/src/intervals.rs:214:41

And it will repeat this error on every restart for the next hour until the "repeated hour" has passed. After that, everything's back to working like normal.

For interval-only use cases I can likely work around this by settings the Scheduler's timezone to UTC, but that of course won't work for everyone.

Thanks for the otherwise great scheduler lib, btw.

codifryed added a commit to codifryed/coolercontrol that referenced this issue Apr 12, 2024
Workaround for upstream issue (mdsherry/clokwerk#38), where going back in time (DST end) caused panic. 
For our current use cases using UTC is fine. That may not be the case if we should ever implement time-based triggers.
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

No branches or pull requests

1 participant