blaze
blaze copied to clipboard
Bump chrono from 0.4.19 to 0.4.22
Bumps chrono from 0.4.19 to 0.4.22.
Release notes
Sourced from chrono's releases.
0.4.22
Unfortunately the introduction of the iana-time-zone dependency in 0.4.21 caused some new regressions with lesser known platforms. This release fixes all of the issues we've encountered, improving the situation on some WebAssembly targets, SGX and on macOS/iOS. We've improved our CI setup to hopefully catch more of these issues before release in the future.
- Make wasm-bindgen optional on
wasm32-unknown-unknown
target (#771)- Avoid iana-time-zone dependency on
x86_64-fortanix-unknown-sgx
(#767, thanks to@trevor-crypto
)- Update
iana-time-zone
version to 0.1.44 to avoid cyclic dependencies (#773, thanks to@Kijewski
for the upstream PRs)- Clarify documentation about year range in formatting/parsing (#765)
0.4.21 is a bugfix release that mainly fixes one regression from 0.4.20:
- Fall back to UTC in case no timezone is found. Unfortunately this is a regression from the changes we made in 0.4.20 where we now parse the timezone database ourselves. Before 0.4.20,
TimeZone::now()
fell back to UTC in the case it could not find the current timezone, but the new implementation panicked in that case.- Correctly detect timezone on Android (also #756). Android does have the timezone database installed, but it's in a different path, and it does not use
/etc/localtime
to keep track of the current timezone. Instead we now use the iana-time-zone crate as a dependency, since it already has quite a bit of logic for finding the current timezone on a host of platforms.Additionally, there is a documentation fix that reverts an incorrect guarantee:
- Document that
%Y
can have a negative value, both in formatting and in parsing (#760, thanks to@alex
)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
@quodlibetor
for their stewardship of the chrono crate for many years! The new maintainers are@djc
and@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-x
for 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
ParserErrorKind
public and available throughParseError::kind()
(#588, thanks to@sbrocket
)- Expose associated
MIN
andMAX
const 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
NaiveWeek
type 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
DoubleEndedIterator
forNaiveDateDaysIterator
/NaiveDateWeeksIterator
(#697, thanks to@teobouvard
)- Implement
std::iter::Sum
forDuration
(#522, thanks to@jakevossen5
)- Add
years_since()
method toDateTime
/Date
(#557 then #707, thanks to@yozhgoor
)- Implement
AddAssign
/SubAssign
forDateTime
/Date
(#698, thanks to@MrGunflame
)- Fix imports on WASM targets (#672, thanks to
@danielalvsaaker
)- Implement std::error::Error for ParseWeekdayError (#745)
Non-functional improvements
... (truncated)
Changelog
Sourced from chrono's changelog.
0.4.22
- Allow wasmbindgen to be optional on
wasm32-unknown-unknown
target [(#771)](chronotope/chrono#771)- Fix compile error for
x86_64-fortanix-unknown-sgx
[(#767)](chronotope/chrono#767)- Update
iana-time-zone
version to 1.44 [(#773)](chronotope/chrono#773)0.4.21
- Fall back to UTC timezone in cases where no timezone is found [(#756)](chronotope/chrono#756)
- Correctly detect timezone on Android [(#756)](chronotope/chrono#756)
- Improve documentation for strftime
%Y
specifier [(#760)](chronotope/chrono#760)0.4.20
- Add more formatting documentation and examples.
- Add support for microseconds timestamps serde serialization/deserialization (#304)
- Fix
DurationRound
is not TZ aware (#495)- Implement
DurationRound
forNaiveDateTime
- Implement
std::iter::Sum
forDuration
- 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
Date
orDateTime
(#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_round
panic 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
ParseErrorKind
public and available throughParseError::kind()
(#588)- Implement
DoubleEndedIterator
forNaiveDateDaysIterator
andNaiveDateWeeksIterator
- Fix panicking when parsing a
DateTime
(@botahamec
)- Add support for getting week bounds based on a specific
NaiveDate
and aWeekday
(#666)- Remove libc dependency from Cargo.toml.
- Add the
and_local_timezone
method toNaiveDateTime
- Fix the behavior of
Duration::abs()
for negative durations with non-zero nanos- Add compatibility with rfc2822 comments (#733)
- Make
js-sys
andwasm-bindgen
enabled by default when target iswasm32-unknown-unknown
for ease of API discovery- Add the
Months
struct and associatedAdd
andSub
impls
Commits
4514276
update changelogdb8bde3
Apply clippy suggestionsf6b575c
Bump version number to 0.4.22af69b90
Require iana-time-zone 0.1.4484f98e0
set fallback feature in iana-time-zone depedency511d368
Add sgx build to CIbee614a
Do not include iana-time-zone for sgxfe4bd22
allow optional wasmbindgen95223ee
format: be specific about support year range2d22e57
Bump version number to 0.4.21- 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 rebase
will rebase this PR -
@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it -
@dependabot merge
will merge this PR after your CI passes on it -
@dependabot squash and merge
will squash and merge this PR after your CI passes on it -
@dependabot cancel merge
will cancel a previously requested merge and block automerging -
@dependabot reopen
will reopen this PR if it is closed -
@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major version
will 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 version
will 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 dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)