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

Bump chrono from 0.4.30 to 0.4.33 #277

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 7, 2024

Bumps chrono from 0.4.30 to 0.4.33.

Release notes

Sourced from chrono's releases.

0.4.33

This release fixes the broken docrs.rs build of chrono 0.4.32.

What's Changed

v0.4.32

In this release we shipped part of the effort to reduce the number of methods that could unexpectedly panic, notably for the DateTime and Duration types.

Chrono internally stores the value of a DateTime in UTC, and transparently converts it to the local value as required. For example adding a second to a DateTime needs to be done in UTC to get the correct result, but adding a day needs to be done in local time to be correct. What happens when the value is near the edge of the representable range, and the implicit conversions pushes it beyond the representable range? Many methods could panic on such inputs, including formatting the value for Debug output.

In chrono 0.4.32 the range of NaiveDate, NaiveDateTime and DateTime is made slightly smaller. This allows us to always do the implicit conversion, and in many cases return the expected result. Specifically the range is now from January 1, -262144 until December 31, 262143, one year less on both sides than before. We expect this may trip up tests if you hardcoded the MIN and MAX dates.

Duration had a similar issue. The range of this type was pretty arbitrary picked to match the range of an i64 in milliseconds. Negating an i64::MIN pushes a value out of range, and in the same way negating Duration::MIN could push it out of our defined range and cause a panic. This turns out to be somewhat common and hidden behind many layers of abstraction. We adjusted the type to have a minimum value of -Duration::MAX instead and prevent the panic case.

Other highlights:

  • Duration gained new fallible initialization methods.
  • Better support for rkyv.
  • Most methods on NaiveDateTime are now const.
  • We had to bump our MSRV to 1.61 to keep building with our dependencies. This will also allow us to make more methods on DateTime const in a future release.

Complete list of changes:

Fixes

  • Fix panic in TimeZone::from_local_datetime (#1071)
  • Fix out of range panics in DateTime getters and setters (#1317, #1329)

Additions

  • Add NaiveDateTime::checked_(add|sub)_offset (#1313)
  • Add DateTime::to_utc (#1325)
  • Derive Default for Duration (#1327)
  • Add Duration::subsec_nanos (#1327)
  • Add try_* builders to Duration (#1327)
  • Implement AddAssign and SubAssign for Duration (#1327)
  • Make methods on NaiveDateTime const where possible (#1286)
  • Split clock feature into clock and now (#1343, thanks @​mmastrac)
  • Add From<NaiveDate> for NaiveDateTime (#1355, thanks @​dcechano)
  • Add NaiveDateTime::from_timestamp_nanos (#1357, thanks @​Ali-Mirghasemi)
  • Add Months::num_months() and num_years() (#1373, thanks @​danwilliams)
  • Add DateTime<Utc>::from_timestamp_millis (#1374, thanks @​xmakro)

Changes

  • Fix panic in Duration::MIN.abs() (adjust Duration::MIN by 1 millisecond) (#1334)
  • Bump MSRV to 1.61 (#1347)
  • Update windows-targets requirement from 0.48 to 0.52 (#1360)
  • Update windows-bindgen to 0.52 (#1379)

Deprecations

  • Deprecate standalone format functions (#1306)

... (truncated)

Commits
  • 7c419a3 Prepare 0.4.33 release
  • a9b37c4 Make rkyv feature default to size_32
  • a73b543 Don't assume rkyv-(16|32|64) implies the rkyv feature
  • b5381f8 Fixed typo in Duration::hours() exception
  • bf70419 52
  • 7757386 Prepare 0.4.32 release
  • cee242a Fix typos in Datelike impl for DateTime
  • 6ec8f97 Add from_timestamp_millis to DateTime<Utc> (#1374)
  • 65f0cc2 CI Linting: Fix missing sources checkout in toml job.
  • 5536687 Add Months::as_u32() (#1373)
  • Additional commits viewable in compare view

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 will merge this PR once it's up-to-date and CI passes on it, as requested by @d10sfan.


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)

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Feb 7, 2024
@d10sfan
Copy link
Member

d10sfan commented Feb 7, 2024

@dependabot merge

Copy link
Contributor Author

dependabot bot commented on behalf of github Feb 7, 2024

Dependabot tried to merge this PR, but received the following error from GitHub:

At least 1 approving review is required by reviewers with write access.

@d10sfan
Copy link
Member

d10sfan commented Feb 7, 2024

@dependabot merge

@dependabot dependabot bot force-pushed the dependabot/cargo/chrono-0.4.33 branch from 400adfb to 61fd844 Compare February 7, 2024 20:28
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.30 to 0.4.33.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](chronotope/chrono@v0.4.30...v0.4.33)

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

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/cargo/chrono-0.4.33 branch from 61fd844 to b2c535b Compare February 7, 2024 20:29
@dependabot dependabot bot merged commit 1d586b7 into master Feb 7, 2024
4 checks passed
@dependabot dependabot bot deleted the dependabot/cargo/chrono-0.4.33 branch February 7, 2024 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant