Remove chrono dependency in favour of time crate
#26
Reference in New Issue
Block a user
Delete Branch "remove-chrono"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The recent flagging of RUSTSEC-2020-0159 seems to be making
cargo auditgrumble everywhere about the inclusion ofchronoin the dependency tree. While this crate useschronoin a sound manner, there is unfortunately no way thatcargo auditcan detect that it's not using any of the features that cause the issue.timehas been updated recently to include a lot of the features thatchronooriginally included exclusively, so it's possible to removechronoentirely and replace it with something more sound, aschronoseems to be either inactive or currently unmaintained.Our CI is flagging this crate up in
cargo audit, (since it is a dependency ofjsonwebtoken), and this fix should deal with the problem by replacingchronoentirely with the newtimeversion 0.3. Unfortunately, this does change the public API of the crate.All tests are passsing and fuzzing seems to be running with no issues. I have changed some of the code around
UtcTimeandGeneralizedTimetypes to be more compatible with RFC5280 and thetimeformatting API, which is a little bit of a pain around short year strings.Is it possible to make this change for a new minor version of this crate? It would be very helpful!
Absolutely! Thanks for the heads up and the patch. This is now merged and published to crates as version 0.6.0. (0.5 -> 0.6 to reflect the API change.)