-
Notifications
You must be signed in to change notification settings - Fork 543
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
NaiveDateTime::from_timestamp_millis(-1000)
does not compare equal to NaiveDateTime::from_timestamp_opt(-1, 0)
#903
Comments
3 tasks
This has been fixed by: #885 but is yet to be released. If possible do you mind testing against the HEAD of the |
crapStone
pushed a commit
to Calciumdibromid/CaBr2
that referenced
this issue
Mar 15, 2023
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [chrono](https://github.com/chronotope/chrono) | dependencies | patch | `0.4.23` -> `0.4.24` | --- ### Release Notes <details> <summary>chronotope/chrono</summary> ### [`v0.4.24`](https://github.com/chronotope/chrono/releases/tag/v0.4.24): 0.4.24 [Compare Source](chronotope/chrono@v0.4.23...v0.4.24) This is a small maintenance release with accumulated fixes and improvements. - Fix doc on `Days::new()` to refer to days, not months ([#​874](chronotope/chrono#874), thanks to [@​brotskydotcom](https://github.com/brotskydotcom)) - Clarify out of range value for `from_timestamp_opt()` ([#​879](chronotope/chrono#879), thanks to [@​xmo-odoo](https://github.com/xmo-odoo)) - Add `format_localized()` for `NaiveDate` ([#​881](chronotope/chrono#881), thanks to [@​mseele](https://github.com/mseele)) - Fix bug in `Add`/`Sub` `Days`, add tests with DST timezone ([#​878](chronotope/chrono#878)) - Make `NaiveTime::MIN` public ([#​890](chronotope/chrono#890)) - Fix `from_timestamp_millis()` implementation and add more tests ([#​885](chronotope/chrono#885)) - Fix typo in docstrings ([#​897](chronotope/chrono#897), thanks to [@​dandxy89](https://github.com/dandxy89)) - Add test proving that [#​903](chronotope/chrono#903) is fixed in 0.4.x head ([#​905](chronotope/chrono#905), thanks to [@​umanwizard](https://github.com/umanwizard)) - Add `from_timestamp_micros()` function ([#​906](chronotope/chrono#906), thanks to [@​umanwizard](https://github.com/umanwizard)) - Check cargo-deny in CI ([#​909](chronotope/chrono#909)) - Derive `Hash` for most pub types that also derive `PartialEq` ([#​938](chronotope/chrono#938), thanks to [@​bruceg](https://github.com/bruceg)) - Update deprecated methods in `from_utc()` example ([#​939](chronotope/chrono#939), thanks to [@​greg-el](https://github.com/greg-el)) - Fix panic in `DateTime::checked_add_days()` ([#​942](chronotope/chrono#942), thanks to [@​Ekleog](https://github.com/Ekleog)) - More documentation for dates before 1 BCE or after 9999 CE ([#​950](chronotope/chrono#950), thanks to [@​cgit](https://github.com/cgit)) - Improve `FixedOffset` docs ([#​953](chronotope/chrono#953), thanks to [@​klnusbaum](https://github.com/klnusbaum)) - Add chrono-fuzz to CI and update its libfuzzer-sys dependency ([#​968](chronotope/chrono#968), thanks to [@​LingMan](https://github.com/LingMan)) - Fixes to parsing and calculation of week numbers ([#​966](chronotope/chrono#966), thanks to [@​raphaelroosz](https://github.com/raphaelroosz)) - Make iana-time-zone a target specific dependency ([#​980](chronotope/chrono#980), thanks to [@​krtab](https://github.com/krtab)) - Make eligible functions `const` ([#​984](chronotope/chrono#984), thanks to [@​tormeh](https://github.com/tormeh)) Thanks to all contributors from the chrono team, [@​esheppa](https://github.com/esheppa) and [@​djc](https://github.com/djc). </details> --- ### 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS42LjAiLCJ1cGRhdGVkSW5WZXIiOiIzNS42LjAifQ==--> Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1815 Reviewed-by: crapStone <crapstone@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Title says it all. This seems to be because the former gets interpreted as -2 seconds and 1 billion nanoseconds, whereas the latter gets interpreted as -1 seconds and 0 nanoseconds.
These feel to me like they should be equal, but I might be missing some subtlety.
The text was updated successfully, but these errors were encountered: