-
Notifications
You must be signed in to change notification settings - Fork 2
chore(deps): update rust crate time to v0.3.44 #218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/time-0.x-lockfile
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for hoard-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
bee490b
to
46f61de
Compare
46f61de
to
7e9d0c2
Compare
7e9d0c2
to
b51ae55
Compare
b51ae55
to
fa9505d
Compare
fa9505d
to
27c85bf
Compare
27c85bf
to
530c61c
Compare
530c61c
to
c954ec0
Compare
c954ec0
to
34ef049
Compare
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Note
Mend has cancelled the proposed renaming of the Renovate GitHub app being renamed to
mend[bot]
.This notice will be removed on 2025-10-07.
This PR contains the following updates:
0.3.36
->0.3.44
Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
time-rs/time (time)
v0.3.44
Compare Source
Fixed
PrimitiveDateTime
,UtcDateTime
, andOffsetDateTime
with differing signs (i.e.one negative and one positive year) would return the inverse result of what was expected. This was
introduced in v0.3.42 and has been fixed.
wasm-bindgen
enabledserde_json
.This has been fixed by explicitly specifying the type in the relevant locations.
v0.3.43
Compare Source
Added
rand
0.9Fixed
convert
module, any use ofper
with types that were not the same (such asNanosecond::per(Second)
) would not compile due to a bug. This has been fixed.v0.3.42
Compare Source
Added
Time::duration_until
Time::duration_since
per_t
method for all types intime::convert
. This is similar to the existingper
method, butcan return any of the primitive numeric types that can represent the result. This will cut down on
as
casts while ensuring correctness. Type inference isn't perfect, so you may need to provide atype annotation in some situations.
impl PartialOrd for Month
andimpl Ord for Month
; this assumes the months are in the same yearSystemTimeExt
trait, adding methods for checked arithmetic withtime::Duration
and obtainingthe difference between two
SystemTime
s as atime::Duration
UtcDateTime
withrand
(this was inadvertently omitted previously)impl core::error::Error
for all error types (now available when thestd
feature is disabled)thread-safe.
#[track_caller]
has been added to all relevant methods.Changed
itoa
has been removed, as the standard library now has similar functionalityby default.
deterministic, avoiding any subtle differences between platforms or compiler versions.
Fixed
Previously, it could be off by one nanosecond due to floating point imprecision.
OffsetDateTime::to_offset
andUtcDateTime::to_offset
has beenfixed. The bug could result in a value that was invalid. It was unlikely to ever occur in
real-world code, as it involved passing a UTC offset that has never been used in any location.
Miscellaneous
typical use cases of
format_description!
.Time
,PrimitiveDateTime
,UtcDateTime
, andOffsetDateTime
. The first three have gains of approximately 85% (i.e. 6× faster).#[inline]
.v0.3.41
Compare Source
Fixed
deranged
. This fix is permanent and covers futuresimilar changes upstream.
v0.3.40
Compare Source
Added
mod
generated bytime::sere::format_description!
.v0.3.39
Compare Source
Fixed
Both of these were regressions in v0.3.38 and are now checked in CI.
v0.3.38
Compare Source
Added
The
[year]
component (in format descriptions) now supports arange
modifier, which can beeither
standard
orextended
. The default isextended
for backwards compatibility. This isintended as a manner to opt out of the extended range when the
large-dates
feature is enabled.When the
large-dates
feature is not enabled, the modifier has no effect.UtcDateTime
, which is semantically equivalent to anOffsetDateTime
with UTC as its offset. Theadvantage is that it is the same size as a
PrimitiveDateTime
and has improved operability withwell-known formats.
As part of this, there were some other additions:
utc_datetime!
macro, which is similar to thedatetime!
macro but constructs aUtcDateTime
.PrimitiveDateTime::as_utc
OffsetDateTime::to_utc
OffsetDateTime::checked_to_utc
time::serde::timestamp::milliseconds_i64
, which is a module to serialize/deserialize timestampsas the Unix timestamp. The pre-existing module does this as an
i128
where ani64
wouldsuffice. This new module should be preferred.
Changed
error::Format
has had itssource()
implementation changed to no longer return a boxed valuefrom the
ComponentRange
variant. If you were explicitly expecting this, you will need to updateyour code. The method API remains unchanged.
[year repr:century]
supports single-digit values.format_into
methods accept?Sized
references.Miscellaneous
proven as uninhabited. The relevant fields are doc-hidden and not semver-guaranteed to remain as
such, though it is unlikely to change.
gains. Among the methods changed are
util::is_leap_year
util::weeks_in_year
Month::length
Date::to_calendar_date
Date::month
Date::day
Date::from_julian_day
Date::to_julian_day
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.
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.