Sourced from chrono's releases.
0.4.31
Another maintenance release. It was not a planned effort to improve our support for UNIX timestamps, yet most PRs seem related to this.
Deprecations
- Deprecate
timestamp_nanosin favor of the non-panickingtimestamp_nanos_opt(#1275)Additions
- Add
DateTime::<Utc>::from_timestamp(#1279, thanks@demurgos)- Add
TimeZone::timestamp_micros(#1285, thanks@emikitas)- Add
DateTime<Tz>::timestamp_nanos_optandNaiveDateTime::timestamp_nanos_opt(#1275)- Add
UNIX_EPOCHconstants (#1291)Fixes
- Format day of month in RFC 2822 without padding (#1272)
- Don't allow strange leap seconds which are not on a minute boundary initialization methods (#1283) This makes many methods a little more strict:
NaiveTime::from_hms_milliNaiveTime::from_hms_milli_optNaiveTime::from_hms_microNaiveTime::from_hms_micro_optNaiveTime::from_hms_nanoNaiveTime::from_hms_nano_optNaiveTime::from_num_seconds_from_midnightNaiveTime::from_num_seconds_from_midnight_optNaiveDate::and_hms_milliNaiveDate::and_hms_milli_optNaiveDate::and_hms_microNaiveDate::and_hms_micro_optNaiveDate::and_hms_nanoNaiveDate::and_hms_nano_optNaiveDateTime::from_timestampNaiveDateTime::from_timestamp_optTimeZone::timestampTimeZone::timestamp_opt- Fix underflow in
NaiveDateTime::timestamp_nanos_opt(#1294, thanks@crepererum)Documentation
- Add more documentation about the RFC 2822 obsolete date format (#1267)
Internal
- Remove internal
__doctestfeature anddoc_commentdependency (#1276)- CI: Bump
actions/checkoutfrom 3 to 4 (#1280)- Optimize
NaiveDate::add_daysfor small values (#1214)- Upgrade
pure-rust-localesto 0.7.0 (#1288, thanks@jeremijawo did good improvements onpure-rust-locales)Thanks to all contributors on behalf of the chrono team,
@djcand@pitdicker!0.4.30
In this release, we have decided to swap out the
chrono::Durationtype (which has been a re-export of time 0.1Durationtype) with our own definition, which exposes a strict superset of thetime::DurationAPI. This helps avoid warnings about the [CVE-2020-26235] and [RUSTSEC-2020-0071] advisories for downstream users and allows us to improve theDurationAPI going forward.
... (truncated)
e730c6a
Bump version to 0.4.312afdde8
fix: underflow during datetime->nanos conversion46ad2c2
Add UNIX_EPOCH constants1df8db3
Add TimeZone::timestamp_micros861d4e1
Make TimeZone::timestamp_millis_opt use3c4846a
Upgrade pure-rust-locales to 0.7.06665804
Deny leap second if secs != 59 in
from_num_seconds_from_midnight_opt61b7ffb
Deny leap second if secs != 59 in from_hms_nano_opt202af6c
Don't generate leap seconds that are not 60 in NaiveTime's Arbitrary
impl60283ab
Don't create strange leap seconds in tests