Skip to content

Releases: time-rs/time

v0.2.6

30 Jan 03:36
ecdbac5
Compare
Choose a tag to compare

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 with PrimitiveDateTime if the underlying UTC was the same.
  • Subtraction of two OffsetDateTimes previously disregarded the subsecond values.

All of these changes are now checked in CI, so regressions will be caught.

v0.2.5

28 Jan 00:29
8caedc3
Compare
Choose a tag to compare

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

22 Jan 22:23
9ec2862
Compare
Choose a tag to compare

v0.2.4 is identical to v0.2.3 with the exception of the breaking change, which has been reverted. v0.2.4 is backwards-compatible with v0.2.2.

v0.2.3

17 Jan 03:51
fc6fdf5
Compare
Choose a tag to compare

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 to time::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

08 Jan 03:22
208a3d3
Compare
Choose a tag to compare

Bugs fixed

#200 has been fixed.

v0.2.1

25 Dec 01:48
733f90d
Compare
Choose a tag to compare

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

v0.2.0

18 Dec 23:48
ab09c47
Compare
Choose a tag to compare

See #190 for major details. This is essentially a new crate compared to v0.1, and only has a few methods for back-compatibility where trivially feasible.

Minimum supported Rust version: 1.40.0