lholden / job_scheduler

A simple cron-like job scheduling library for Rust.
Apache License 2.0
196 stars 34 forks source link

Add timezone configuration #15

Closed nanocryk closed 2 years ago

nanocryk commented 4 years ago

Hi ! Since, Schedule support timezones, it would be useful to configure JobScheduler with a custom timezone, such as chrono::offset::Local.

nanocryk commented 4 years ago

To be implemented it seems necessary that the trait chrono::TimeZone provides function now such as we can call Z::now() for Z: TimeZone.

I opened an issue on the chrono repository : https://github.com/chronotope/chrono/issues/366

It can also be implemented in-house with a custom trait implemented for currently known TimeZone impls, but I think it's better to have it directly in chrono.