Sourced from time's changelog.
0.3.37 [2024-12-03]
Added
Time::MAX, equivalent totime!(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 thelarge-datefeature enabled, there is an ambiguity when parsing the two back-to-back.- Parsing of
strftime-style format descriptions, located attime::format_description::parse_strftime_borrowedandtime::format_description::parse_strftime_ownedtime::util::refresh_tzandtime::util::refresh_tz_unchecked, which updates information obtained via theTZenvironment variable. This is equivalent to thetzsetsyscall on Unix-like systems, with and without built-in soundness checks, respectively.Month::lengthandutil::days_in_month, replacingutil::days_in_year_month.- Expressions are permitted in
time::serde::format_description!rather than only paths. This also drastically improves diagnostics when an invalid value is provided.Changed
Obtaining the system UTC offset on Unix-like systems should now succeed when multi-threaded. However, if the
TZenvironment variable is altered, the program will not be aware of this untiltime::util::refresh_tzortime::util::refresh_tz_uncheckedis called.refresh_tzhas the same soundness requirements as obtaining the system UTC offset previously did, with the requirements still being automatically enforced.refresh_tz_uncheckeddoes not enforce these requirements at the expense of beingunsafe. Most programs should not need to call either function.Due to this change, the
time::util::local_offsetmodule has been deprecated in its entirety. Theget_soundnessandset_soundnessfunctions 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
Durations less than one second is now correct. It previously omitted the negative sign.From<js_sys::Date> for OffsetDateTimenow ensures sub-millisecond values are not erroneously returned.
d4e39b3
v0.3.37 release0943997
Fix CI failure8b50f04
Update lints56f1db6
Add Month::length, days_in_month03bcfe9
Skip formatting some macros, update UI tests4404638
Permit exprs in serde::format_description!6b43b44
strftime implementation98569ff
Hide deprecations from docsfebf3a1
Obtain local offset in multi-threaded situations1e19827
Update rstest and rstest_reuse; bump MSRV to 1.67.1 (#716)