zslayton / cron

A cron expression parser in Rust
Apache License 2.0
376 stars 69 forks source link

Remove dependency on time from chrono. #100

Closed AldaronLau closed 2 years ago

AldaronLau commented 2 years ago

It would be good to get rid of the time dependency pulled in by chrono because: a) https://rustsec.org/advisories/RUSTSEC-2020-0071 and b) it's not needed.

zslayton commented 2 years ago

Thanks for the PR and sorry for the delayed reply. This is a good idea; I just tried it out in my local workspace and the build failed because cron uses Utc::now(), which I infer requires the time crate. I'll investigate this more closely when I have an opportunity.

AldaronLau commented 2 years ago

@zslayton I figured out that the "clock" feature needs to be enabled. I wasn't seeing the error on my end because chrono-tz (a dev-dependency) enables that feature, commenting it out I also saw the build failure. I just pushed the patch so it should build fine now.

zslayton commented 2 years ago

Nice, thanks!