Releases: time-rs/time
v0.2.7
v0.2.6
Bug fixes
v0.2.5 introduces a major inconsistency, not just in its behavior for PrimitiveDateTime::using_offset
, but also changes its signature, rendering it incapable of being used in const
contexts.
Both the behavior and the function signature have been fixed, while still fixing the underlying issue. PrimitiveDateTime::using_offset
mentions in the docs that the PrimitiveDateTime
is assumed to be UTC, and is converted to the provided offset. This was the previous behavior.
The following functionality had bugs that were fixed (from v0.2.4):
OffsetDateTime::timestamp
OffsetDateTime::parse
- Equality, comparison for
OffsetDateTime
— Subsecond values were not checked previously. They also relied on the faulty timestamp implementation. - Hashing of
OffsetDateTime
— Same as equality and comparison. Additionally, hashes would collide withPrimitiveDateTime
if the underlying UTC was the same. - Subtraction of two
OffsetDateTime
s previously disregarded the subsecond values.
All of these changes are now checked in CI, so regressions will be caught.
v0.2.5
Bug fixes
PrimitiveDateTime::using_offset
was poorly defined, leading to an ambiguity that cause some methods to treat the existing datetime as UTC, while others treated it as the time in the provided offset. This release ensures that the behavior is what I intended — the datetime is assumed to be in the provided offset.
NB: This release has been yanked from crates.io due to major back-compatibility issues. These have been fixed in 0.2.6.
v0.2.4
v0.2.3
v0.2.3 has been yanked from crates.io. The breaking change (with regard to feature flags) should not have been made. By yanking this version, any existing code will continue to work, while new code will not have potential backwards-incompatible behavior. The change was reverted in v0.2.4.
Additions
time!
,date!
,offset!
macros- Top-level
parse
function, allowing for type inference. time::Result<T>
alias totime::Result<T, time::Error>
Deprecated
Panicking APIs have been deprecated in favor of the new macros.
Changes
Minimum supported Rust version is now 1.34, changed from 1.40. This permits a number of crates to upgrade without breaking MSRV.
Bug fixes
A number of parsing methods used unchecked constructors. This was because the values should have been checked prior. They are now.
Breaking changes
The "std" feature has been renamed to "alloc", which disables the standard library. This was necessary to bring MSRV down to 1.34.
v0.2.2
v0.2.1
Changed/Fixed
Duration
now allows for the nanoseconds component to be negative. Previously, it was not possible to directly construct a value between 0 and -1 seconds. As a result of this change, a number of method signatures were changed to accommodate the sign.
Duration
was also re-implemented, which allows for a number of methods to become const fn
.
Minimum supported Rust version: 1.40.0