chore(deps): update rust crate time to v0.3.37 #67
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.3.23
->0.3.37
Release Notes
time-rs/time (time)
v0.3.37
Compare Source
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-date
feature enabled, there is an ambiguity when parsing the two back-to-back.strftime
-style format descriptions, located attime::format_description::parse_strftime_borrowed
andtime::format_description::parse_strftime_owned
time::util::refresh_tz
andtime::util::refresh_tz_unchecked
, which updates informationobtained via the
TZ
environment variable. This is equivalent to thetzset
syscall on Unix-likesystems, with and without built-in soundness checks, respectively.
Month::length
andutil::days_in_month
, replacingutil::days_in_year_month
.time::serde::format_description!
rather than only paths. This alsodrastically 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
TZ
environment variable is altered, the program will not be aware of this untiltime::util::refresh_tz
ortime::util::refresh_tz_unchecked
is called.refresh_tz
has thesame soundness requirements as obtaining the system UTC offset previously did, with the
requirements still being automatically enforced.
refresh_tz_unchecked
does not enforce theserequirements at the expense of being
unsafe
. Most programs should not need to call eitherfunction.
Due to this change, the
time::util::local_offset
module has been deprecated in its entirety. Theget_soundness
andset_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
Duration
s less than one second is now correct. It previously omittedthe negative sign.
From<js_sys::Date> for OffsetDateTime
now ensures sub-millisecond values are not erroneouslyreturned.
v0.3.36
Compare Source
Fixed
FormatItem
can be used as part of an import path. See #675 for details.v0.3.35
Compare Source
Added
Duration::checked_neg
ext::InstantExt
, which provides methods for usingtime::Duration
withstd::time::Instant
Changed
Instant
is deprecated. It is recommended to usestd::time::Instant
directly, importingtime::ext::InstantExt
for interoperability withtime::Duration
.FormatItem
has been renamed toBorrowedFormatItem
, avoiding confusion withOwnedFormatItem
.An alias has been added for backwards compatibility.
Fixed
Duration
is documented correctly. The previous documentationcontained an off-by-one error.
v0.3.34
Compare Source
Fixed
Computing the local offset on Windows works again. It was broken in some cases in v0.3.32 and
v0.3.33.
v0.3.33
Compare Source
Fixed
Builds targeting
wasm32-unknown-unknown
now work again.v0.3.32
Compare Source
Added
Date::replace_ordinal
PrimitiveDateTime::replace_ordinal
OffsetDateTime::replace_ordinal
OffsetDateTime
as a Unix timestamp with subsecond precision for serde.time::serde::timestamp::milliseconds
time::serde::timestamp::microseconds
time::serde::timestamp::nanoseconds
Changed
Duration::time_fn
is deprecated.v0.3.31
Compare Source
Added
OffsetDateTime::new_in_offset
OffsetDateTime::new_utc
Changed
UtcOffset
has been expanded from ±23:59:59 to ±25:59:59. This is to supportthe full POSIX range while permitting infallible negation.
v0.3.30
Compare Source
Added
powerfmt::smart_display::SmartDisplay
has been added for the main types in the library. Theseimplementations ensure that values follow the requested fill, width, and alignment when using
format!
or similar macros.Display
is implemented in terms ofSmartDisplay
.Fixed
NumericalDuration
orNumericalStdDuration
.v0.3.29
Compare Source
Added
Date
has been added. BothDate
andOption<Date>
are four bytes.Second::per(Day)
, which returnsthe number of seconds in one day. See the types in the [
time::convert
module][time::convert module] for moreinformation.
Changed
--cfg unsound_local_offset
has been removed.#![feature(no_coverage)]
was previously used internally for code coverage. It is no longer used,so it has been removed.
modifier::OffsetHour
has been changed. This was unintentionally changed inv0.3.17 and went unnoticed until now. The sign is now only present if needed by default, as was
the case previously. This does not affect any situation where
format_description!
orformat_description::parse
is used.Fixed
std::time::Duration
to/from anOffsetDateTime
will not result ininteger overflow internally. It will still panic if the result is out of range.
v0.3.28
Compare Source
Added
Iso8601
format description have been added. Thisavoids the need to manually configure the format.
[end]
component has been added. This is ignored during formatting, but is used to indicatethe end of input when parsing. If any input remains after this component, an error is returned.
This is useful when using the
[first]
component, as it avoids the need to reorder variants.Changed
versions of MacOS do not meet the requirements for the exemption.
UnexpectedTrailingCharacters
error variant has been moved toParseFromDescription
. Allpreviously-existing locations of this variant have been deprecated and will no longer be returned.
v0.3.27
Compare Source
This sets the
serde
dependency requirement to>= 1.0.184
where the binaries have been removed.v0.3.26
Compare Source
This release contains only a single change.
serde
is required to be a version prior to 1.0.171.This is due to the decision by the maintainer of
serde
to include pre-built binaries that areexecuted without the end user's knowledge. As of the time of publishing, the included binary has not
even been reproduced. This is a security risk, and the
time
project strongly opposes thisdecision. While this may break some users' builds due to conflicting versions, it is a necessary
step to ensure the security.
v0.3.25
Compare Source
Fixed
Time::replace_milliseconds
would panic on some out-of-range values. This hasbeen fixed.
v0.3.24
Compare Source
Added
subsecond
component is taken into account when parsing theunix_timestamp
component. Ifdata is conflicting, the
subsecond
value takes precedence.Time
with only thehour
component is now supported. Theminute
andsecond
, andsubsecond
components are assumed to be zero.Changed
Parsed
has been improved.before being rejected in the final step. Now, invalid values are rejected as soon as they are
encountered. This affects the error variant returned, which may cause minor breakage for any code
(incorrectly) relying on the exact error variant.
Time
, an error is returned if components are present but not consecutive. Forexample, if
hours
andseconds
are present,minutes
will not be assumed to be zero.Fixed
Duration::checked_div
could return a slightly incorrect result in somecases. This has been fixed.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.