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_nanos
in 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_opt
andNaiveDateTime::timestamp_nanos_opt
(#1275)- Add
UNIX_EPOCH
constants (#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_milli
NaiveTime::from_hms_milli_opt
NaiveTime::from_hms_micro
NaiveTime::from_hms_micro_opt
NaiveTime::from_hms_nano
NaiveTime::from_hms_nano_opt
NaiveTime::from_num_seconds_from_midnight
NaiveTime::from_num_seconds_from_midnight_opt
NaiveDate::and_hms_milli
NaiveDate::and_hms_milli_opt
NaiveDate::and_hms_micro
NaiveDate::and_hms_micro_opt
NaiveDate::and_hms_nano
NaiveDate::and_hms_nano_opt
NaiveDateTime::from_timestamp
NaiveDateTime::from_timestamp_opt
TimeZone::timestamp
TimeZone::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
__doctest
feature anddoc_comment
dependency (#1276)- CI: Bump
actions/checkout
from 3 to 4 (#1280)- Optimize
NaiveDate::add_days
for small values (#1214)- Upgrade
pure-rust-locales
to 0.7.0 (#1288, thanks@jeremija
wo did good improvements onpure-rust-locales
)Thanks to all contributors on behalf of the chrono team,
@djc
and@pitdicker
!
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_opt
61b7ffb
Deny leap second if secs != 59 in from_hms_nano_opt
202af6c
Don't generate leap seconds that are not 60 in NaiveTime's Arbitrary
impl60283ab
Don't create strange leap seconds in tests