Closed rts-gordon closed 7 months ago
+1 I have a project where the job scheduling needs to be done in LOCAL time too. It needs to work across change from daylight savings time to normal time and vice versa. I like to implement this project in Rust. Any hints where to look in the source code to add this feature myself are welcome?
Hey @CHCP & @palstek Thanks for the report.
Ok - I've found the same issue with my own project I'm using this crate for. Still need to come up with an elegant solution - but definetely part of pain I need to solve for myself as well.
@palstek so in lib/rs line 94 there is a function utc. This is the entry for converting the seconds post UNIX_EPOCH between the different Job types.
any progress on this? Linux cron uses local system time, so most users will expect cron jobs they configure to run at system time, not UTC.
@mvniekerk If you migrate from cron to croner , there is time zone support - and support for extended syntax. Basically croner uses whatever timezone is supplied through a DateTime
See the "Why croner" section for a comparison
https://github.com/hexagon/croner-rust
Also relevant for PR #49
Hi all (@Hexagon , @rts-gordon , @dumbasPL ) Did you check the latest release of this?
Hi @mvniekerk I known that 'tokio-cron-scheduler' run in UTC, but under some scenario we need run cronjob in LOCAL time, so would you like to implement this feature? Thank you very much.