Skip to content

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 2, 2025

Bumps time from 0.3.41 to 0.3.42.

Release notes

Sourced from time's releases.

v0.3.42

See the changelog for details.

Changelog

Sourced from time's changelog.

0.3.42 [2025-08-31]

Added

  • Time::duration_until
  • Time::duration_since
  • per_t method for all types in time::convert. This is similar to the existing per method, but can 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 a type annotation in some situations.
  • impl PartialOrd for Month and impl Ord for Month; this assumes the months are in the same year
  • SystemTimeExt trait, adding methods for checked arithmetic with time::Duration and obtaining the difference between two SystemTimes as a time::Duration
  • Permit using UtcDateTime with rand (this was inadvertently omitted previously)
  • impl core::error::Error for all error types (now available when the std feature is disabled)
  • MacOS can now obtain the local UTC offset in multi-threaded programs as the system APIs are thread-safe.
  • #[track_caller] has been added to all relevant methods.

Changed

  • The minimum supported Rust version is now 1.81.0.
  • The dependency on itoa has been removed, as the standard library now has similar functionality by default.
  • Formatting a component that involves a floating point number is now guaranteed to be deterministic, avoiding any subtle differences between platforms or compiler versions.

Fixed

  • Serializing timestamps with nanosecond precision should always emit the correct value. Previously, it could be off by one nanosecond due to floating point imprecision.
  • A previously unknown bug in OffsetDateTime::to_offset and UtcDateTime::to_offset has been fixed. 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

  • The amount of code generated by macros has been massively reduced, on the order of 65-70% for typical use cases of format_description!.
  • Significant performance gains for comparisons of Time, PrimitiveDateTime, UtcDateTime, and OffsetDateTime. The first three have gains of approximately 85% (i.e. 6× faster).
  • Nearly all methods are #[inline].
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [time](https://github.com/time-rs/time) from 0.3.41 to 0.3.42.
- [Release notes](https://github.com/time-rs/time/releases)
- [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md)
- [Commits](time-rs/time@v0.3.41...v0.3.42)

---
updated-dependencies:
- dependency-name: time
  dependency-version: 0.3.42
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@sanders41 sanders41 merged commit d44ea49 into main Sep 2, 2025
46 checks passed
@sanders41 sanders41 deleted the dependabot/cargo/time-0.3.42 branch September 2, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant