chore(deps): update rust crate time to v0.3.44 #27
			No reviewers
			
				
				
			
		
		
		
	
	
	
		Labels
		
	
	
	
	No labels
	
		
			
	
	bug
		
			duplicate
		
			enhancement
		
			help wanted
		
			invalid
		
			question
		
			wontfix
		
		
			bug
		
			duplicate
		
			enhancement
		
			help wanted
		
			invalid
		
			question
		
			renovate-bot
		
			renovate-security
		
			security
		
			wontfix
		
	
		No milestone
		
			
		
	No project
	
		
	
	
	
	
		No assignees
		
	
	
		
			
		
	
	
	
		1 participant
	
	
		
		
	Notifications
	
		
	
	
	
		
	
	
	Due date
No due date set.
	
		Dependencies
		
		
	
	
	No dependencies set.
	
	
		
	
	
		
			Reference
		
	
	
		
	
	
			LibrePages/libconfig!27
			
		
	
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	
	No description provided.
		
		Delete branch "renovate/time-0.x-lockfile"
	
	Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
0.3.36->0.3.44Release Notes
time-rs/time (time)
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: 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 has been generated by Renovate Bot.
d75f2176ectoba4c5077c3fix(deps): update rust crate time to v0.3.37to fix(deps): update rust crate time to v0.3.39fix(deps): update rust crate time to v0.3.39to fix(deps): update rust crate time to v0.3.41ba4c5077c3to6b3af21e956b3af21e95toca0272ae84fix(deps): update rust crate time to v0.3.41to fix(deps): update rust crate time to v0.3.42ca0272ae84toe5ee5978d1fix(deps): update rust crate time to v0.3.42to fix(deps): update rust crate time to v0.3.43fix(deps): update rust crate time to v0.3.43to chore(deps): update rust crate time to v0.3.43e5ee5978d1to0da5639745chore(deps): update rust crate time to v0.3.43to chore(deps): update rust crate time to v0.3.44View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.