From d4e39b306db1624795cd4eb0cfde8cc802edd0e3 Mon Sep 17 00:00:00 2001 From: Jacob Pratt Date: Tue, 3 Dec 2024 02:30:07 -0500 Subject: [PATCH] v0.3.37 release --- CHANGELOG.md | 42 +++++++++++++++++++++++++++++++++++++++++- Cargo.lock | 4 ++-- Cargo.toml | 2 +- time-macros/Cargo.toml | 2 +- time/Cargo.toml | 2 +- 5 files changed, 46 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76390cc41..a672d3c2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,49 @@ The format is based on [Keep a Changelog]. This project adheres to [Semantic Ver --- +## 0.3.37 [2024-12-03] + +### Added + +- `Time::MAX`, equivalent to `time!(23:59:59.999999999)` +- `[year repr:century]` is now supported in format descriptions. When used in conjunction with + `[year repr:last_two]`, there is sufficient information to parse a date. Note that with the + `large-date` feature enabled, there is an ambiguity when parsing the two back-to-back. +- Parsing of `strftime`-style format descriptions, located at + `time::format_description::parse_strftime_borrowed` and + `time::format_description::parse_strftime_owned` +- `time::util::refresh_tz` and `time::util::refresh_tz_unchecked`, which updates information + obtained via the `TZ` environment variable. This is equivalent to the `tzset` syscall on Unix-like + systems, with and without built-in soundness checks, respectively. + +### Changed + +- Obtaining the system UTC offset on Unix-like systems should now succeed when multi-threaded. + However, if the `TZ` environment variable is altered, the program will not be aware of this until + `time::util::refresh_tz` or `time::util::refresh_tz_unchecked` is called. `refresh_tz` has the + same soundness requirements as obtaining the system UTC offset previously did, with the + requirements still being automatically enforced. `refresh_tz_unchecked` does not enforce these + requirements at the expense of being `unsafe`. Most programs should not need to call either + function. + + Due to this change, the `time::util::local_offset` module has been deprecated in its entirety. The + `get_soundness` and `set_soundness` functions are now no-ops. + + Note that while calls _should_ succeed, success is not guaranteed in any situation. Downstream + users should always be prepared to handle the error case. + +### Fixed + +- Floating point values are truncated, not rounded, when formatting. +- RFC3339 allows arbitrary separators between the date and time components. +- Serialization of negative `Duration`s less than one second is now correct. It previously omitted + the negative sign. +- `From for OffsetDateTime` now ensures sub-millisecond values are not erroneously + returned. + ## 0.3.36 [2024-04-10] -### # Fixed +### Fixed - `FormatItem` can be used as part of an import path. See [#675] for details. diff --git a/Cargo.lock b/Cargo.lock index 7a5356072..8dfa01a50 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -579,7 +579,7 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" dependencies = [ "criterion", "deranged", @@ -608,7 +608,7 @@ version = "0.1.2" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" dependencies = [ "num-conv", "time-core", diff --git a/Cargo.toml b/Cargo.toml index 570a8692d..350f170e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ resolver = "2" [workspace.dependencies] time-core = { path = "time-core", version = "=0.1.2" } -time-macros = { path = "time-macros", version = "=0.2.18" } +time-macros = { path = "time-macros", version = "=0.2.19" } criterion = { version = "0.5.1", default-features = false } deranged = { version = "0.3.9", default-features = false, features = [ diff --git a/time-macros/Cargo.toml b/time-macros/Cargo.toml index 1a1f42441..7e4655e68 100644 --- a/time-macros/Cargo.toml +++ b/time-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "time-macros" -version = "0.2.18" +version = "0.2.19" authors = ["Jacob Pratt ", "Time contributors"] edition = "2021" rust-version = "1.67.1" diff --git a/time/Cargo.toml b/time/Cargo.toml index b7cd0a5f1..00ebfd6e4 100644 --- a/time/Cargo.toml +++ b/time/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "time" -version = "0.3.36" +version = "0.3.37" authors = ["Jacob Pratt ", "Time contributors"] edition = "2021" rust-version = "1.67.1"