Update Rust crate time to v0.3.55 - #20
Open
konflux-staging[bot] wants to merge 1 commit into
Open
Conversation
konflux-staging
Bot
force-pushed
the
konflux/mintmaker/main/time-0.x-lockfile
branch
from
January 13, 2026 12:23
9dad28d to
92ff353
Compare
konflux-staging
Bot
force-pushed
the
konflux/mintmaker/main/time-0.x-lockfile
branch
from
January 24, 2026 08:13
92ff353 to
22cbca4
Compare
konflux-staging
Bot
force-pushed
the
konflux/mintmaker/main/time-0.x-lockfile
branch
from
February 5, 2026 12:19
22cbca4 to
33019e6
Compare
konflux-staging
Bot
force-pushed
the
konflux/mintmaker/main/time-0.x-lockfile
branch
from
March 17, 2026 16:22
33019e6 to
3157b1e
Compare
konflux-staging
Bot
force-pushed
the
konflux/mintmaker/main/time-0.x-lockfile
branch
from
June 16, 2026 12:16
3157b1e to
0cfd3f9
Compare
konflux-staging
Bot
force-pushed
the
konflux/mintmaker/main/time-0.x-lockfile
branch
from
June 17, 2026 00:16
0cfd3f9 to
a4995b7
Compare
konflux-staging
Bot
force-pushed
the
konflux/mintmaker/main/time-0.x-lockfile
branch
from
June 25, 2026 08:11
a4995b7 to
2a85545
Compare
konflux-staging
Bot
force-pushed
the
konflux/mintmaker/main/time-0.x-lockfile
branch
from
July 3, 2026 12:16
2a85545 to
b142d61
Compare
konflux-staging
Bot
force-pushed
the
konflux/mintmaker/main/time-0.x-lockfile
branch
from
July 4, 2026 08:05
b142d61 to
b239f5f
Compare
konflux-staging
Bot
force-pushed
the
konflux/mintmaker/main/time-0.x-lockfile
branch
from
July 23, 2026 12:19
b239f5f to
e287c85
Compare
Signed-off-by: konflux-staging <124796549+konflux-staging[bot]@users.noreply.github.com>
konflux-staging
Bot
force-pushed
the
konflux/mintmaker/main/time-0.x-lockfile
branch
from
August 11, 2026 17:33
e287c85 to
24ef657
Compare
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
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.
This PR contains the following updates:
0.3.36→0.3.55Release Notes
time-rs/time (time)
v0.3.55Compare Source
Fixed
DateIter::nth, ensuring correct behavior.led to some valid values being parsed incorrectly and others being rejected.
UtcOffset.OffsetDateTime::from_unix_timestamp_nanosandUtcDateTime::from_unix_timestamp_nanoscorrectlyreturn
Nonefor all out-of-range values, rather than unexpectedly panicking in some situations.OffsetDateTime::checked_to_offsetandUtcDateTime::checked_to_offsetcorrectly returnNonefor all out-of-range values, rather than unexpectedly panicking in some situations.
v0.3.54Compare Source
Added
PrimitiveDateTimehas been renamed toPlainDateTime.Durationhas been renamed toSignedDuration.Date,Month, andWeekday. Relevant iterator methods have beenoverridden to ensure maximum performance.
For both
PlainDateTimeandSignedDuration, a non-deprecated type alias has been added forbackwards compatibility. The new names should be preferred.
Changed
powerfmtimplementations) for various types has been changedto
()and made public. This guarantees that no additional metadata will be present.Performance
v0.3.53Compare Source
There are no publicly-facing changes in this release. It solely works around the
cookiecraterelying on an implementation detail of
timethat was never part of the public API (and thussubject to semver guarantees). The internal API has been reverted to the extent necessary for
cookieto compile. This measure is temporary; the internal change will be re-applied in anyet-to-be-determined future release.
v0.3.52Compare Source
Fixed
time!macro are parsed using the textual representation, ensuringaccuracy. Previously, they were parsed using the floating point representation, which could result
in a loss of precision and even invalid values.
date!macro could previously create an invalid value that would then panic at compile time.The macro now emits a proper error instead.
returns an error as intended.
Added
v0.3.51Compare Source
Fixed
timecompiles withmacrosenabled. This version is otherwise identical to v0.3.50.v0.3.50Compare Source
Fixed
timecompiles withmacrosenabled. This version is otherwise identical to v0.3.50.v0.3.49Compare Source
Fixed
compiling. A patch has been added that avoids triggering the bug.
v0.3.48Compare Source
This version was yanked due to a bug in the Rust compiler.
Security
[subsecond digits:1+]is capped at 32 to avoid parsing unboundeduser input. Digits after the 9th have no semantic meaning.
#[repr]forWeekday. The value of the variants is relied upon in multiplelocations for soundness. The practical effect of this change is nothing, as Rust has always mapped
C-like
enums to 0..N in memory.Compatibility
format and parse valid UTF-8.
format_description::parseis deprecated. It is recommended to useformat_description::parse_borrowed::<3>orformat_description::parse_owned::<3>.Added
unitmodule have a generic parameter, though this is currently not used formuch. Usage will be expanded in the future.
unitmodule and the genericUnittype are permitted.rand0.10[ignore]requires that the remaining inputnot begin mid-codepoint.
format:falseis supported on[optional]components. This is not possible in version 1 andversion 2 format descriptions due to API compatibility.
time::serde::format_description!macro uses a new, clearer syntax for version 3.time::serde::format_description!(mod foo [Date] = "[year]-[month]-[day]");scope. You must import it yourself.
case-sensitivity when parsing a numerical month.
[year]defaults torange:standardChanged
convertmodule has been renamed tounit.Fixed
Tin ISO 8601unintentionally prohibited this.
strftimeformat descriptions but the component is not. Thiswould previously panic.
Performance
Huge performance gains across multiple areas, including:
DurationDisplayimpls for all major typesstrftimeparsingDepending on the area, gains range from 3× to even 11×.
v0.3.47Compare Source
Security
The possibility of a stack exhaustion denial of service attack when parsing RFC 2822 has been
eliminated. Previously, it was possible to craft input that would cause unbounded recursion. Now,
the depth of the recursion is tracked, causing an error to be returned if it exceeds a reasonable
limit.
This attack vector requires parsing user-provided input, with any type, using the RFC 2822 format.
Compatibility
error at compile time if the type being formatted does not provide sufficient information. This
would previously fail at runtime. Similarly, attempting to format a value with ISO 8601 that is
only configured for parsing (i.e.
Iso8601::PARSING) will error at compile time.Added
when done manually.
date!(2026-W01-2)is now supported. Previously, a space was required betweenWand01.[end]now has atrailing_inputmodifier which can either beprohibit(the default) ordiscard. When it isdiscard, all remaining input is ignored. Note that if there are componentsafter
[end], they will still attempt to be parsed, likely resulting in an error.Changed
Fixed
This has been fixed such that the number of bytes written is always correct.
eliminated. This would previously wrap when overflow checks were disabled. Instead of storing the
depth as
u8, it is stored asu32. This would require multiple gigabytes of nested input tooverflow, at which point we've got other problems and trivial mitigations are available by
downstream users.
v0.3.46Compare Source
Added
All possible panics are now documented for the relevant methods.
The need to use
#[serde(default)]when using customserdeformats is documented. This appliesonly when deserializing an
Option<T>.Duration::nanoseconds_i128has been made public, mirroringstd::time::Duration::from_nanos_u128.Various methods for truncating components have been added, avoiding the need to call the fallible
replacemethods multiple times.For
PrimitiveDateTime,UtcDateTime, andOffsetDateTime:truncate_to_dayFor
Time,PrimitiveDateTime,UtcDateTime, andOffsetDateTime:truncate_to_hourtruncate_to_minutetruncate_to_secondtruncate_to_millisecondtruncate_to_microsecondChanged
part of this.
error::ComponentRange, along with types that contain it, has been significantlyreduced.
Fixed
PartialOrdandOrdimplementations ofUtcOffsetnow return the expected result.v0.3.45Compare Source
Added
time::format_description::StaticFormatDescriptiontype alias for&'static [BorrowedFormatItem<'static>]. This is the type returned by thetime::macros::format_description!macro.Changed
Durationare nowconst fn.Parsedare nowconst fn.serdedependency has been replaced withserde_core, This reduces compile times by notincluding unused parts of
serde.Date::from_julian_dayuses a new algorithm, resulting in an approximately 16% performanceimprovement. This method is used internally by numerous other methods.
util::is_leap_yearuses a new algorithm, resulting in an approximately 8% performanceimprovement.
v0.3.44Compare Source
Fixed
PrimitiveDateTime,UtcDateTime, andOffsetDateTimewith 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-bindgenenabledserde_json.This has been fixed by explicitly specifying the type in the relevant locations.
v0.3.43Compare Source
Added
rand0.9Fixed
convertmodule, any use ofperwith types that were not the same (such asNanosecond::per(Second)) would not compile due to a bug. This has been fixed.v0.3.42Compare Source
Added
Time::duration_untilTime::duration_sinceper_tmethod for all types intime::convert. This is similar to the existingpermethod, butcan return any of the primitive numeric types that can represent the result. This will cut down on
ascasts while ensuring correctness. Type inference isn't perfect, so you may need to provide atype annotation in some situations.
impl PartialOrd for Monthandimpl Ord for Month; this assumes the months are in the same yearSystemTimeExttrait, adding methods for checked arithmetic withtime::Durationand obtainingthe difference between two
SystemTimes as atime::DurationUtcDateTimewithrand(this was inadvertently omitted previously)impl core::error::Errorfor all error types (now available when thestdfeature is disabled)thread-safe.
#[track_caller]has been added to all relevant methods.Changed
itoahas 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_offsetandUtcDateTime::to_offsethas 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.41Compare Source
Fixed
deranged. This fix is permanent and covers futuresimilar changes upstream.
v0.3.40Compare Source
Added
modgenerated bytime::sere::format_description!.v0.3.39Compare Source
Fixed
Both of these were regressions in v0.3.38 and are now checked in CI.
v0.3.38Compare Source
Added
The
[year]component (in format descriptions) now supports arangemodifier, which can beeither
standardorextended. The default isextendedfor backwards compatibility. This isintended as a manner to opt out of the extended range when the
large-datesfeature is enabled.When the
large-datesfeature is not enabled, the modifier has no effect.UtcDateTime, which is semantically equivalent to anOffsetDateTimewith UTC as its offset. Theadvantage is that it is the same size as a
PrimitiveDateTimeand 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_utcOffsetDateTime::to_utcOffsetDateTime::checked_to_utctime::serde::timestamp::milliseconds_i64, which is a module to serialize/deserialize timestampsas the Unix timestamp. The pre-existing module does this as an
i128where ani64wouldsuffice. This new module should be preferred.
Changed
error::Formathas had itssource()implementation changed to no longer return a boxed valuefrom the
ComponentRangevariant. 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_intomethods accept?Sizedreferences.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_yearutil::weeks_in_yearMonth::lengthDate::to_calendar_dateDate::monthDate::dayDate::from_julian_dayDate::to_julian_dayv0.3.37Compare 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-datefeature enabled, there is an ambiguity when parsing the two back-to-back.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 informationobtained via the
TZenvironment variable. This is equivalent to thetzsetsyscall on Unix-likesystems, with and without built-in soundness checks, respectively.
Month::lengthandutil::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
TZenvironment variable is altered, the program will not be aware of this untiltime::util::refresh_tzortime::util::refresh_tz_uncheckedis called.refresh_tzhas thesame soundness requirements as obtaining the system UTC offset previously did, with the
requirements still being automatically enforced.
refresh_tz_uncheckeddoes 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_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
Durations less than one second is now correct. It previously omittedthe negative sign.
From<js_sys::Date> for OffsetDateTimenow ensures sub-millisecond values are not erroneouslyreturned.
Configuration
📅 Schedule: (UTC)
🚦 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.
To execute skipped test pipelines write comment
/ok-to-test.Documentation
Find out how to configure dependency updates in MintMaker documentation or see all available configuration options in Renovate documentation.