Sourced from time's releases.
v0.3.43
See the changelog for details.
v0.3.42
See the changelog for details.
Sourced from time's changelog.
0.3.43 [2025-09-02]
Added
- Support for
rand0.9Fixed
- In the
convertmodule, any use ofperwith types that were not the same (such asNanosecond::per(Second)) would not compile due to a bug. This has been fixed.0.3.42 [2025-08-31]
Added
Time::duration_untilTime::duration_sinceper_tmethod for all types intime::convert. This is similar to the existingpermethod, but can return any of the primitive numeric types that can represent the result. This will cut down onascasts while ensuring correctness. Type inference isn't perfect, so you may need to provide a type annotation in some situations.impl PartialOrd for Monthandimpl Ord for Month; this assumes the months are in the same yearSystemTimeExttrait, adding methods for checked arithmetic withtime::Durationand obtaining the difference between twoSystemTimes as atime::Duration- Permit using
UtcDateTimewithrand(this was inadvertently omitted previously)impl core::error::Errorfor all error types (now available when thestdfeature is disabled)- MacOS can now obtain the local UTC offset in multi-threaded programs as the system APIs are thread-safe.
#[track_caller]has been added to all relevant methods.Changed
- The minimum supported Rust version is now 1.81.0.
- The dependency on
itoahas been removed, as the standard library now has similar functionality by default.- Formatting a component that involves a floating point number is now guaranteed to be deterministic, avoiding any subtle differences between platforms or compiler versions.
Fixed
- Serializing timestamps with nanosecond precision should always emit the correct value. Previously, it could be off by one nanosecond due to floating point imprecision.
- A previously unknown bug in
OffsetDateTime::to_offsetandUtcDateTime::to_offsethas been fixed. The bug could result in a value that was invalid. It was unlikely to ever occur in real-world code, as it involved passing a UTC offset that has never been used in any location.Miscellaneous
- The amount of code generated by macros has been massively reduced, on the order of 65-70% for typical use cases of
format_description!.
... (truncated)
45b9932
v0.3.43 release8cbf0db
Fix bug with convert3343e85
Add support for rand 0.9afb2574
Add note about MSRVed2852e
v0.3.42 release1067543
Fix copied commentf45bff5
Use const block for readabilityb38c118
Add #[inline] to most methodsf410951
Add #[track_caller] to numerous methodsd30f3d0
Optimize Time::sub