Skip to content
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

Update Rust crate chrono to 0.4.35 #432

Merged
merged 1 commit into from
Mar 18, 2024
Merged

Update Rust crate chrono to 0.4.35 #432

merged 1 commit into from
Mar 18, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 18, 2024

Mend Renovate

This PR contains the following updates:

Package Type Update Change
chrono dependencies patch 0.4.33 -> 0.4.35

Release Notes

chronotope/chrono (chrono)

v0.4.35

Compare Source

Most of our efforts have shifted to improving the API for a 0.5 release, for which cleanups and refactorings are landing on the 0.4.x branch.

The most significant changes in this release are two sets of deprecations.

  • We deprecated all timestamp-related methods on NaiveDateTime. The reason is that a timestamp is defined to be in UTC. The NaiveDateTime type doesn't know the offset from UTC, so it was technically wrong to have these methods. The alternative is to use the similar methods on the DateTime<Utc> type, or from the TimeZone trait.

    Converting from NaiveDateTime to DateTime<Utc> is simple with .and_utc(), and in the other direction with .naive_utc().

  • The panicking constructors of TimeDelta (the new name of the Duration type) are deprecated. This was the last part of chrono that defaulted to panicking on error, dating from before rust 1.0.

  • A nice change is that NaiveDate now includes a niche. So now Option<NaiveDate>, Option<NaiveDateTime> and Option<DateTime<Tz>> are the same size as their base types.

  • format::Numeric and format::Fixed are marked as non_exhaustive. This will allow us to improve our formatting and parsing support, and we have reason to believe this breaking change will have little to no impact on users.

Additions

  • Add DateTime::{from_timestamp_micros, from_timestamp_nanos} (#​1234)
  • Add getters to Parsed (#​1465)

Deprecations

  • Deprecate timestamp methods on NaiveDateTime (#​1473)
  • Deprecate panicking constructors of TimeDelta (#​1450)

Changes/fixes

  • Use NonZeroI32 inside NaiveDate (#​1207)
  • Mark format::Numeric and format::Fixed as non_exhaustive (#​1430)
  • Parsed fixes to error values (#​1439)
  • Use overflowing_naive_local in DateTime::checked_add* (#​1333)
  • Do complete range checks in Parsed::set_* (#​1465)

Documentation

Internal

Thanks to all contributors on behalf of the chrono team, @​djc and @​pitdicker!

v0.4.34

Compare Source

Notable changes
  • In chrono 0.4.34 we finished the work to make all methods const where doing so is supported by rust 1.61.
  • We renamed the Duration type to TimeDelta. This removes the confusion between chrono's type and the later Duration type in the standard library. It will remain available under the old name as a type alias for compatibility.
  • The Windows implementation of Local is rewritten. The new version avoids panics when the date is outside of the range supported by windows (the years 1601 to 30828), and gives more accurate results during DST transitions.
  • The Display format of TimeDelta is modified to conform better to ISO 8601. Previously it converted all values greater than 24 hours to a value with days. This is not correct, as doing so changes the duration from an 'accurate' to a 'nominal' representation to use ISO 8601 terms.
Fixes
Additions
Changes
  • Rename Duration to TimeDelta, add type alias (#​1406)
  • Make TimeDelta methods const (#​1337)
  • Make remaining methods of NaiveDate, NaiveWeek, NaiveTime and NaiveDateTime const where possible (#​1337)
  • Make methods on DateTime const where possible (#​1400)
  • Make Display format of TimeDelta conform better to ISO 8601 (#​1328)
Documentation
Internal
  • Switch branch names: 0.4.x releases are the main branch, work on 0.5 happens in the 0.5.x branch (#​1390, #​1402).
  • Don't use deprecated method in impl Arbitrary for DateTime and set up CI test (#​1336)
  • Remove workaround for Rust < 1.61 (#​1393)
  • Bump codecov/codecov-action from 3 to 4 (#​1404)
  • Remove partial support for handling -0000 offset (#​1411)
  • Move TOO_LONG error out of parse_internal (#​1419)

Thanks to all contributors on behalf of the chrono team, @​djc and @​pitdicker!


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot enabled auto-merge (squash) March 18, 2024 14:15
@renovate renovate bot merged commit 206904e into main Mar 18, 2024
1 check passed
@renovate renovate bot deleted the renovate/chrono-0.x branch March 18, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants