build(deps): bump chrono from 0.4.19 to 0.4.20
Bumps chrono from 0.4.19 to 0.4.20.
Release notes
Sourced from chrono's releases.
0.4.20
chrono is a date and time library for Rust and 0.4.20 is the first chrono release since Sep 2020. There has been a long hiatus since the previous maintainer was no longer able to spend much time on the crate; thanks to
@quodlibetorfor their stewardship of the chrono crate for many years! The new maintainers are@djcand@esheppa. Our first priority has been fixing the soundness issues with calls tolocaltime_r()as first reported in #499 and the RUSTSEC-2020-0159 advisory. In order to do this we adapted code from the tz-rs crate maintained by@x-hgg-xfor use within chrono -- thanks for working on that! With the new implementation, chrono uses safe Rust code to parse the timezone data files on Unix platforms directly instead of relying on libc.Due to compatibility reasons, this release does not yet remove the time 0.1 dependency, though chrono 0.4.20 does not depend on the vulnerable parts of the time 0.1.x versions. In a future 0.5 release, we will remove the time dependency.
The minimum supported Rust version for 0.4.20 is 1.32.0, which is intentionally still quite conservative. If you are using chrono 0.4 with a Rust version older than 1.52, we'd like to hear from you since we'd like to further modernize the code base to ease maintenance.
Fixes
- Fix unsound call to
localtime_r()by parsing timezone files in Rust on Unix (#677 and #728)- Allow RFC 2822 parser to deal with comments (#733 then #737, thanks to
@Finomnis)- Avoid panicking during parsing (#686, thanks to
@botahamec)- Avoid panics when rounding durations (#659, thanks to
@ARBaart)- Fix
Duration::abs()behavior in case of negative durations with nanoseconds (#734, thanks to@abreis)Additions
- Make
ParserErrorKindpublic and available throughParseError::kind()(#588, thanks to@sbrocket)- Expose associated
MINandMAXconst values in favor of free-standing consts (#726)- Add (optional) support for rkyv (#644 and #701, thanks to
@dovahcrow)- Support month-based calculations against
NaiveDate(#732 with follow up in #752, thanks to@avantgardnerio)- Add
NaiveWeektype to facilitate week-based calculations (#666, thanks to@sestrella)- Add
NaiveDateTime::and_local_timezone()method (#711, thanks to@botahamec)- Add
DateTime::from_local()method (#572, thanks to@retrhelo)- Extend serde integration for
NaiveDateTime(#664, thanks to@nickelc)- Implement
DoubleEndedIteratorforNaiveDateDaysIterator/NaiveDateWeeksIterator(#697, thanks to@teobouvard)- Implement
std::iter::SumforDuration(#522, thanks to@jakevossen5)- Add
years_since()method toDateTime/Date(#557 then #707, thanks to@yozhgoor)- Implement
AddAssign/SubAssignforDateTime/Date(#698, thanks to@MrGunflame)- Fix imports on WASM targets (#672, thanks to
@danielalvsaaker)- Implement std::error::Error for ParseWeekdayError (#745)
Non-functional improvements
- Improve CI to better exercise WASM targets (#662, thanks to
@AmateurECE)- More WASM testing improvements, enable dependencies by default (#746)
- Fix compiling for wasm32-unknown-emscripten target (#568, thanks to
@orion78fr)- Use stub implementation for anything not unix and not windows (#593, thanks to
@yu-re-ka)- Remove now unused libc dependency (#710, thanks to
@metent)- Clean up some clippy warnings (#721, thanks to
@botahamec)- Clarify documentation for
Utc::now()(#647, thanks to@ModProg)- Clarify documentation for
DateTime::with_timezone()(#747, thanks to@kevincox)- Improve examples for
naiveserde integration (#616, thanks to@nickelc)- Clean up
extern cratestatements and outdated comments (#665, thanks to@nickelc)- Fix typo in deprecation notice (#744, thanks to
@Mike-Dax)- Fix some typos in documentation (#680 and #695, thanks to
@cuishuangand@fxredeemer)- Implement caching for CI (#609, thanks to
@Milo123459)0.4.20-rc.1
0.4.20 is the first chrono release since Sep 2020. There has been a long hiatus since the previous maintainer was no longer able to spend much time on the crate; thanks to
@quodlibetorfor their stewardship of the chrono crate for many years! The new maintainers are@djcand@esheppa. Our first priority has been fixing the soundness issues with calls tolocaltime_r()as first reported in #499 and the RUSTSEC-2020-0159 advisory. In order to do this we adapted code from the tz-rs crate maintained by@x-hgg-xfor use within chrono -- thanks for working on that! With the new implementation, chrono uses safe Rust code to parse the timezone data files on Unix platforms directly instead of relying on libc.
... (truncated)
Changelog
Sourced from chrono's changelog.
0.4.20 (unreleased)
- Add more formatting documentation and examples.
- Add support for microseconds timestamps serde serialization/deserialization (#304)
- Fix
DurationRoundis not TZ aware (#495)- Implement
DurationRoundforNaiveDateTime- Implement
std::iter::SumforDuration- Add
DateTime::from_local()to construct from given local date and time (#572)- Add a function that calculates the number of years elapsed between now and a given
DateorDateTime(#557)- Correct build for wasm32-unknown-emscripten target (#568)
- Change
Local::now()andUtc::now()documentation from "current date" to "current date and time" (#647)- Fix
duration_roundpanic on rounding byDuration::zero()(#658)- Add optional rkyv support.
- Add support for microseconds timestamps serde serialization for
NaiveDateTime.- Add support for optional timestamps serde serialization for
NaiveDateTime.- Fix build for wasm32-unknown-emscripten (
@yu-re-ka#593)- Make
ParseErrorKindpublic and available throughParseError::kind()(#588)- Implement
DoubleEndedIteratorforNaiveDateDaysIteratorandNaiveDateWeeksIterator- Fix panicking when parsing a
DateTime(@botahamec)- Add support for getting week bounds based on a specific
NaiveDateand aWeekday(#666)- Remove libc dependency from Cargo.toml.
- Add the
and_local_timezonemethod toNaiveDateTime- Fix the behavior of
Duration::abs()for negative durations with non-zero nanos- Add compatibility with rfc2822 comments (#733)
- Make
js-sysandwasm-bindgenenabled by default when target iswasm32-unknown-unknownfor ease of API discovery- Add the
Monthsstruct and associatedAddandSubimpls
Commits
0b7feacClean up some unreachable_pub warnings65f1f2eBump version to 0.4.20bd3b48dRevise Months APIab688c3ImplementAdd\<Months>andSub\<Months>forNaiveDate(#731)782f904Clarify docs forDateTime::with_timezone27c0558dont use stub.rs when wasmbind feature is enabled56f80e4run on all branches and also for changes in the ci folder353f179Implement std::error::Error for ParseWeekdayError309cbebFixed typo in deprecation notice26e231aBump version to 0.4.20-rc.1- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
-
@dependabot rebasewill rebase this PR -
@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it -
@dependabot mergewill merge this PR after your CI passes on it -
@dependabot squash and mergewill squash and merge this PR after your CI passes on it -
@dependabot cancel mergewill cancel a previously requested merge and block automerging -
@dependabot reopenwill reopen this PR if it is closed -
@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)