Upgrading chrono 0.3 to 0.4
Breaking0.3.0 → 0.4.45Breaking9Security1Platform4Deprecated14New203Changed47Fixed87Other118
BreakingUpgrade verdict
9 breaking changes and 4 platform requirement changes and a security fix.
In plain terms
- Drop stabilized feature doc_auto_cfg.
- Drop deny lints, eager Debug impls are a mixed blessing.
- Remove obsolete weird feature guard.
- Remove rustc-serialize feature (.
Must act Top 5 of 28 that need code or config changes
Requires Rust 1.62.0 from 0.4.41 (none stated before).
What you must change
Breaking9
Drop stabilized feature doc_auto_cfg.
Drop deny lints, eager Debug impls are a mixed blessing.
Remove obsolete weird feature guard.
Remove rustc-serialize feature (.
rustc-serializeRename Duration to TimeDelta, add type alias.
DurationTimeDeltaRemove num-iter dependency (.
Drop the dependency on time v0.1, which is deprecated, unless the oldtime feature is active.
oldtimetime::Durationchrono::DurationVersion 0.4.36 introduced an unexpected breaking change and was yanked.
LocalResultMappedLocalTimeResultformat::Numeric and format::Fixed are marked as non_exhaustive.
format::Numericformat::Fixednon_exhaustiveSecurity1
Potential segfault in
localtime_r invocationsPlatform4
We had to bump our MSRV to 1.61 to keep building with our dependencies.
DateTimeBump MSRV to 1.61.
Make methods on NaiveTime const, update MSRV to 1.57 (.
NaiveTimeBump the MSRV to 1.56.
Deprecations to plan for
Deprecated14
Deprecate NaiveDateTime::UNIX_EPOCH.
NaiveDateTime::UNIX_EPOCHRevert TimeDelta deprecations.
TimeDeltaDeprecate TimeStamp::timestamp_subsec_nanos, which was missed in the 0.4.35 release.
TimeStamp::timestamp_subsec_nanosWe deprecated all timestamp-related methods on NaiveDateTime.
NaiveDateTimeDateTime<Utc>TimeZone.and_utc().naive_utc()The panicking constructors of TimeDelta (the new name of the Duration type) are deprecated.
TimeDeltaDurationDeprecate timestamp methods on NaiveDateTime.
NaiveDateTimeDeprecate panicking constructors of TimeDelta.
TimeDeltaDeprecate standalone format functions.
formatDeprecate timestamp_nanos in favor of the non-panicking timestamp_nanos_opt.
timestamp_nanostimestamp_nanos_optDeprecate TimeZone::datetime_from_str.
TimeZone::datetime_from_strDeprecate DateTime::{from_local, from_utc} (.
Deprecate methods that have an _opt() alternative.
_opt()Deprecate usage of the Date type.
Date<Tz>More strongly deprecate RustcSerialize: remove it from documentation unless the feature is enabled, issue a deprecation warning if the rustc-serialize feature is enabled (@quodlibetor ).