Correct sign in nudge_to_zoned_time#647
Merged
nekevss merged 5 commits intoboa-dev:mainfrom Dec 10, 2025
Merged
Conversation
According to the spec, the sign argument to NudgeToZonedTime should be either 1 or -1, but in temporal_rs, the Sign type can also represent the 0 sign. Add code to explicitly handle the zero sign case when rounding in nudge_to_zoned_time. This was causing a wrong result when rounding the zero duration (see boa-dev#646 ).
nekevss
reviewed
Dec 10, 2025
nekevss
reviewed
Dec 10, 2025
nekevss
approved these changes
Dec 10, 2025
Member
nekevss
left a comment
There was a problem hiding this comment.
Looks good! Thanks for the contribution!
ajperel
pushed a commit
to chromium/chromium
that referenced
this pull request
Dec 16, 2025
Uplift of boa-dev/temporal#647, boa-dev/temporal#636, unicode-org/icu4x#7321 Change-Id: Icf703e2ae907a6a820b6b1141883ed9ab825874c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7261567 Commit-Queue: Manish Goregaokar <manishearth@google.com> Auto-Submit: Manish Goregaokar <manishearth@google.com> Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org> Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org> Cr-Commit-Position: refs/heads/main@{#1559085}
mohd-akram
pushed a commit
to gsource-mirror/chromium-src-third_party-rust
that referenced
this pull request
Jan 9, 2026
Uplift of boa-dev/temporal#647, boa-dev/temporal#636, unicode-org/icu4x#7321 Change-Id: Icf703e2ae907a6a820b6b1141883ed9ab825874c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7261567 Commit-Queue: Manish Goregaokar <manishearth@google.com> Auto-Submit: Manish Goregaokar <manishearth@google.com> Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org> Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org> Cr-Commit-Position: refs/heads/main@{#1559085} NOKEYCHECK=True GitOrigin-RevId: 2add15315bfaeaba94238f5b0e8505da7fe1ae4a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
According to the spec, the sign argument to NudgeToZonedTime should be either 1 or -1, but in temporal_rs, the Sign type can also represent the 0 sign. Add code to explicitly handle the zero sign case when rounding in nudge_to_zoned_time. This was causing a wrong result when rounding the zero duration (see #646 ).
Closes #646