NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #101 most downloaded on crates.io
Date and time library for Rust
Last release 4 months ago
04 Jun 2026
Release timing varies
gaps range from 3 weeks to 8 months
Most releases are documented
notes for 41 of the last 60 stable releases
22 versions withdrawn
withdrawn after publishing
12 years old
95 releases · first in 2014
fix(tz): reject TZ offset hour of 24 to avoid FixedOffset overflow by @SAY-5 in #1787
Add track_caller to non-deprecated functions by @svix-jplatte in #1774
Cargo.toml contents by @coryan in #1772One column per quarter.
Install extra components for lint workflow by @djc in #1741
NaiveDate::abs_diff by @Kinrany in #1752Add fuzzer for DateTime::parse_from_str by @tyler92 in #1700
wasm32-linux support by @arjunr2 in #1707tzdata parsing by @ldm0 in #1679?Sized bound to related methods of DelayedFormat::write_to by @Huliiiiii in #1721from_timestamp_secs method to DateTime by @jasonaowen in #1719Deprecate NaiveDateTime::UNIX_EPOCH by @robertbastian in #1670
subsec_micros and subsec_millis methods to TimeDelta by @ggoetz in #1668NaiveDateTime::UNIX_EPOCH by @robertbastian in #1670as_seconds_f32 and as_seconds_f64 for TimeDelta by @ggoetz in #1671num_days_in_month method to Datelike trait by @aslilac in #1673WeekdaySet, a collection of Weekday that is Copy by @Kinrany in #1676Add Month::num_days() by @djc in #1645
write_to for DelayedFormat by @tugtugtug in #1654Remove obsolete weird feature guard by @djc in #1582
from_timestamp_nanos() by @sgoll in #1591NaiveWeek methods by @bragov4ik in #1600PartialEq,Eq,Hash,Copy and Clone on NaiveWeek by @DSeeLP in #1618#[inline] to num_days by @CommanderStorm in #1627In chrono 0.4.36 we made an accidental breaking change by switching to derive(Copy) for DateTime instead of a manual implementation. It is reverted in…
This release bring a ca. 20% improvement to the performance of the formatting code, and a convenient days_since method for the Weekday type.
Chrono 0.4.38 also removes the long deprecated rustc-serialize feature. Support for rustc-serialize will be soft-destabilized in the next Rust edition. Removing the feature will not break existing users of the feature; Cargo will just not update dependents that rely on it to newer versions of chrono.
In chrono 0.4.36 we made an accidental breaking change by switching to derive(Copy) for DateTime instead of a manual implementation. It is reverted in this release.
rustc-serialize feature (#1548, thanks @workingjubilee)Weekday::days_since (#1249, based on #216 by @clarfonthey)TimeDelta::checked_mul and TimeDelta::checked_div (#1565, thanks @Zomtir)Copy for DateTime if offset is Copy (#1573)test_encodable_json and test_decodable_json functions (#1550)cargo hack check (#1553)Thanks to all contributors on behalf of the chrono team, @djc and @pitdicker!
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Compare
Compare
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Bump version to 0.4.20-beta.1
Bump version to 0.4.20-beta.1
Correct build on solaris/illumos
Restore support for x86_64-fortanix-unknown-sgx
Fix a name resolution error in wasm-bindgen code introduced by removing the dependency on time v0.1
Drop the dependency on time v0.1, which is deprecated, unless the oldtime feature is active. This feature is active by default in v0.4.16 for backward…
Add %Z specifier to the FromStr, similar to the glibc strptime
(does not set the offset from the timezone name)
Drop the dependency on time v0.1, which is deprecated, unless the oldtime
feature is active. This feature is active by default in v0.4.16 for backwards
compatibility, but will likely be removed in v0.5. Code that imports
time::Duration should be switched to import chrono::Duration instead to
avoid breakage.
Correct usage of vec in specific feature combinations (@quodlibetor)
Add day and week iterators for NaiveDate (@gnzlbg & @robyoung)
NaiveDate (@gnzlbg & @robyoung)Month enum (@hhamana)locales. All format functions can now use locales, see the documentation for the
unstable-locales feature.Local.from_local_datetime method for wasmNaiveTime, NaiveDateTime and DateTime<Utc>.Add DurationRound trait that allows rounding and truncating by Duration (@robyoung)
DurationRound trait that allows rounding and truncating by Duration (@robyoung)From for js_sys in wasm to reuse code (@schrieveslaach)Duration::abs to ensure that a duration is just a magnitude (#418 @abreis).
Duration::abs to ensure that a duration is just a magnitude (#418 @abreis).From for js_sys in wasm (#424 @schrieveslaach)time for redox support.Option types (#417 @mwkroening and #429
@fx-kirin)Avoid deprecation warnings for Error::description (@AnderEnder and @quodlibetor #376)
T in FromStr for DateTime<Tz>, meaning that e.g.
dt.to_string().parse::<DateTime<Utc>>() now correctly works on round-trip.
(@quodlibetor in #378)parse_from_rfc2822 (@quodlibetor #368 reported in
#102)Error::description (@AnderEnder and
@quodlibetor #376)Migrate from try! -> ? (question mark) because it is now emitting deprecation warnings and has been stable since rustc 1.13.0
alloc feature to improve no-std
support (in #341) means that if you were relying on chrono with
no-default-features and using any of the functions that require alloc
support (i.e. any of the string-generating functions like to_rfc3339) you
will need to add the alloc feature in your Cargo.toml.DateTime::parse_from_str is more than 2x faster in some cases. (@michalsrb
#358)Iterator of Items (for example
format_with_items) now accept Iterator of Borrow<Item>, so one can
use values or references. (@michalsrb #358)Option<Datetime> etc fields
(@manifest #302)strftime docs page (@qudlibetor #359)try! -> ? (question mark) because it is now emitting
deprecation warnings and has been stable since rustc 1.13.0Make Datetime arithmetic adjust their offsets after discovering their new timestamps (@quodlibetor #337)
wasmbind feature
gate. (@quodlibetor #335)Add '0' to single-digit days in rfc2822 date format ( @wyhaya #323 )
Disable libc default features so that CI continues to work on rust 1.13
LocalResult Copy/Eq/Hashstd::convert::From conversions between the different timezone formats
(@mqudsi #271)timestamp_nanos methods (@jean-airoldie #308)Doc improvements -- improve README CI verification, external links
Added several more serde deserialization helpers (@novacrazy #258)
Hash on FixedOffset (@LuoZijun #254)Added support for parsing nanoseconds without the leading dot (@emschwartz #251)
Added methods to DateTime/NaiveDateTime to present the stored value as a number of nanoseconds since the UNIX epoch (@harkonenbade #247)
More strongly deprecate RustcSerialize: remove it from documentation unless the feature is enabled, issue a deprecation warning if the rustc-serialize…
clock feature, for use in
environments where we don't have access to the current time. (@jethrogb #236)Dates, Times, or DateTimes, returning a
Duration (@tobz1000 #237)Allow parsing timestamps with subsecond precision (@jonasbb)
timestamp_millis method on DateTime and NaiveDateTime that returns
number of milliseconds since the epoch. (@quodlibetor)to_rfc3339_opts method on DateTime (@dekellum)SubsecRound trait that allows rounding to the nearest second
(@dekellum)To the end, the new major release was made with some known lower-priority breaking changes. 0.3.1 is now yanked and any remaining 0.3 users can safely…
This was originally planned as a minor release but was pushed to a major release due to the compatibility concern raised.
IsoWeek has been added for the ISO week without time zone.
The += and -= operators against time::Duration are now supported for
NaiveDate, NaiveTime and NaiveDateTime. (#99)
(Note that this does not invalidate the eventual deprecation of time::Duration.)
SystemTime and DateTime<Tz> types can be now converted to each other via From.
Due to the obvious lack of time zone information in SystemTime,
the forward direction is limited to DateTime<Utc> and DateTime<Local> only.
Intermediate implementation modules have been flattened (#161),
and UTC has been renamed to Utc in accordance with the current convention (#148).
The full list of changes is as follows:
| Before | After |
|---|---|
chrono::date::Date |
chrono::Date |
chrono::date::MIN |
chrono::MIN_DATE |
chrono::date::MAX |
chrono::MAX_DATE |
chrono::datetime::DateTime |
chrono::DateTime |
chrono::naive::time::NaiveTime |
chrono::naive::NaiveTime |
chrono::naive::date::NaiveDate |
chrono::naive::NaiveDate |
chrono::naive::date::MIN |
chrono::naive::MIN_DATE |
chrono::naive::date::MAX |
chrono::naive::MAX_DATE |
chrono::naive::datetime::NaiveDateTime |
chrono::naive::NaiveDateTime |
chrono::offset::utc::UTC |
chrono::offset::Utc |
chrono::offset::fixed::FixedOffset |
chrono::offset::FixedOffset |
chrono::offset::local::Local |
chrono::offset::Local |
chrono::format::parsed::Parsed |
chrono::format::Parsed |
With an exception of Utc, this change does not affect any direct usage of
chrono::* or chrono::prelude::* types.
Datelike::isoweekdate is replaced by Datelike::iso_week which only returns the ISO week.
The original method used to return a tuple of year number, week number and day of the week,
but this duplicated the Datelike::weekday method and it had been hard to deal with
the raw year and week number for the ISO week date.
This change isolates any logic and API for the week date into a separate type.
NaiveDateTime and DateTime can now be deserialized from an integral UNIX timestamp. (#125)
This turns out to be very common input for web-related usages. The existing string representation is still supported as well.
chrono::serde and chrono::naive::serde modules have been added
for the serialization utilities. (#125)
Currently they contain the ts_seconds modules that can be used to
serialize NaiveDateTime and DateTime values into an integral UNIX timestamp.
This can be combined with Serde's [de]serialize_with attributes
to fully support the (de)serialization to/from the timestamp.
For rustc-serialize, there are separate chrono::TsSeconds and chrono::naive::TsSeconds types
that are newtype wrappers implementing different (de)serialization logics.
This is a suboptimal API, however, and it is strongly recommended to migrate to Serde.
The major version was made to fix the broken Serde dependency issues. (#146, #156, #158, #159)
The original intention to technically break the dependency was to facilitate the use of Serde 1.0 at the expense of temporary breakage. Whether this was appropriate or not is quite debatable, but it became clear that there are several high-profile crates requiring Serde 0.9 and it is not feasible to force them to use Serde 1.0 anyway.
To the end, the new major release was made with some known lower-priority breaking changes. 0.3.1 is now yanked and any remaining 0.3 users can safely roll back to 0.3.0.
Various documentation fixes and goodies. (#92, #131, #136)
This is technically a breaking change because Serde 0.9 and 1.0 are not compatible, but this time we decided not to issue a minor version because we h…
Weekday now implements FromStr, Serialize and Deserialize. (#113)
The syntax is identical to %A, i.e. either the shortest or the longest form of English names.
Serde 1.0 is now supported. (#142)
This is technically a breaking change because Serde 0.9 and 1.0 are not compatible, but this time we decided not to issue a minor version because we have already seen Serde 0.8 and 0.9 compatibility problems even after 0.3.0 and a new minor version turned out to be not very helpful for this kind of issues.
This is a silent breaking change (hopefully the last though). You should be prepared for the format change if you depended on rustc-serialize.
The project has moved to the Chronotope organization.
chrono::prelude module has been added. All other glob imports are now discouraged.
FixedOffset can be added to or subtracted from any timelike types.
FixedOffset::local_minus_utc and FixedOffset::utc_minus_local methods have been added.
Note that the old Offset::local_minus_utc method is gone; see below.Serde support for non-self-describing formats like Bincode is added. (#89)
Added Item::Owned{Literal,Space} variants for owned formatting items. (#76)
Formatting items and the Parsed type have been slightly adjusted so that
they can be internally extended without breaking any compatibility.
Weekday is now Hashable. (#109)
ParseError now implements Eq as well as PartialEq. (#114)
More documentation improvements. (#101, #108, #112)
Chrono now only supports Rust 1.13.0 or later (previously: Rust 1.8.0 or later).
Serde 0.9 is now supported. Due to the API difference, support for 0.8 or older is discontinued. (#122)
Rustc-serialize implementations are now on par with corresponding Serde implementations.
They both standardize on the std::fmt::Debug textual output.
This is a silent breaking change (hopefully the last though). You should be prepared for the format change if you depended on rustc-serialize.
Offset::local_minus_utc is now Offset::fix, and returns FixedOffset instead of a duration.
This makes every time zone operation operate within a bias less than one day, and vastly simplifies many logics.
chrono::format::format now receives FixedOffset instead of time::Duration.
The following methods and implementations have been renamed and older names have been removed.
The older names will be reused for the same methods with std::time::Duration in the future.
checked_* → checked_*_signed in Date, DateTime, NaiveDate and NaiveDateTime types
overflowing_* → overflowing_*_signed in the NaiveTime type
All subtraction implementations between two time instants have been moved to
signed_duration_since, following the naming in std::time.
Local offset receives a leap second. (#123)Rustc-serialize support for Date<Tz> types and all offset types has been dropped.
These implementations were automatically derived and never had been in a good shape. Moreover there are no corresponding Serde implementations, limiting their usefulness. In the future they may be revived with more complete implementations.
The following method aliases deprecated in the 0.2 branch have been removed.
DateTime::num_seconds_from_unix_epoch (→ DateTime::timestamp)NaiveDateTime::from_num_seconds_from_unix_epoch (→ NaiveDateTime::from_timestamp)NaiveDateTime::from_num_seconds_from_unix_epoch_opt (→ NaiveDateTime::from_timestamp_opt)NaiveDateTime::num_seconds_unix_epoch (→ NaiveDateTime::timestamp)Formatting items are no longer Copy, except for chrono::format::Pad.
chrono::offset::add_with_leapsecond has been removed.
Use a direct addition with FixedOffset instead.
This is the last version officially supports Rust 1.12.0 or older.
This is the last version officially supports Rust 1.12.0 or older.
(0.2.24 was accidentally uploaded without a proper check for warnings in the default state, and replaced by 0.2.25 very shortly. Duh.)
Nothing published for this version
The documentation was greatly improved for several types, and tons of cross-references have been added. (#77, #78, #80, #82)
The documentation was greatly improved for several types, and tons of cross-references have been added. (#77, #78, #80, #82)
DateTime::timestamp_subsec_{millis,micros,nanos} methods have been added. (#81)
When the system time records a leap second, the nanosecond component was mistakenly reset to zero. (#84)
Local offset misbehaves in Windows for August and later,
due to the long-standing libtime bug (dates back to mid-2015).
Workaround has been implemented. (#85)
%.6f and %.9f used to print only three digits when the nanosecond part is zero.
%.6f and %.9f used to print only three digits when the nanosecond part is zero. (#71)%+ has been updated to reflect the current status. (#71)Fixed::LongWeekdayName was unable to recognize "sunday" (whoops).
Fixed::LongWeekdayName was unable to recognize "sunday" (whoops). (#66)serde dependency has been updated to 0.7. (#63, #64)
serde dependency has been updated to 0.7. (#63, #64)The documentation for Date is made clear about its ambiguity and guarantees.
Date is made clear about its ambiguity and guarantees.DateTime::date had been wrong when the local date and the UTC date is in disagreement. (#61)Chrono no longer pulls a superfluous rand dependency.
rand dependency. (#57)Naive date and time types and DateTime now have a serde support. They serialize as an ISO 8601 / RFC 3339 string just like Debug.
DateTime now have a serde support.
They serialize as an ISO 8601 / RFC 3339 string just like Debug. (#51)Added %.3f, %.6f and %.9f specifier for formatting fractional seconds up to 3, 6 or 9 decimal digits. This is a natural extension to the existing %f.
%.3f, %.6f and %.9f specifier for formatting fractional seconds
up to 3, 6 or 9 decimal digits. This is a natural extension to the existing %f.
Note that this is (not yet) generic, no other value of precision is supported. (#45)Datelike and Timelike.
This does not make a big harm as any type implementing them should be already sized
to be practical, but this change still can break highly generic codes. (#46)README.md. (#41)Your coding agent can read these notes before it upgrades. Set up the MCP server →