Skip to content

Don't panic in overflowing Timestamp to SystemTime conversion - #909

Merged
KodrAus merged 1 commit into
mainfrom
fix/ts-conversion-overflow
Sep 9, 2026
Merged

KodrAus merged 1 commit into
mainfrom
fix/ts-conversion-overflow

Conversation

@KodrAus

@KodrAus KodrAus commented Sep 9, 2026

Copy link
Copy Markdown
Member

Closes #908

We don't have any stable APIs available to us to saturate if conversion would overflow, so we just need to pick something we do have.

@KodrAus
KodrAus merged commit 5613f23 into main Sep 9, 2026
23 checks passed
@KodrAus
KodrAus deleted the fix/ts-conversion-overflow branch September 9, 2026 23:56
kodiakhq Bot pushed a commit to pdylanross/fatigue that referenced this pull request Sep 14, 2026
Bumps uuid from 1.26.0 to 1.26.1.

Release notes
Sourced from uuid's releases.

v1.26.1
What's Changed

Seat the v7 counter below the version nibble by @​lenamonj in uuid-rs/uuid#907
Don't panic in overflowing Timestamp to SystemTime conversion by @​KodrAus in uuid-rs/uuid#909
Prepare for 1.26.1 release by @​KodrAus in uuid-rs/uuid#910

New Contributors

@​lenamonj made their first contribution in uuid-rs/uuid#907

Full Changelog: uuid-rs/uuid@v1.26.0...v1.26.1



Commits

9f92712 Merge pull request #910 from uuid-rs/cargo/v1.26.1
d4df8f0 prepare for 1.26.1 release
5613f23 Merge pull request #909 from uuid-rs/fix/ts-conversion-overflow
fda00eb don't panic in overflowing Timestamp to SystemTime conversion
c82e88c Merge pull request #907 from lenamonj/v7-counter-placement
ac065a6 Align the counter diagram
34ec102 Seat the v7 counter below the version nibble
See full diff in compare view




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 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)
youdie006 added a commit to youdie006/uuid-rs-uuid that referenced this pull request Sep 15, 2026
uuid-rs#909 wrapped the SystemTime add in checked_add, but Duration::new panics
first when subsec_nanos carries past u64::MAX seconds, so
SystemTime::from(Timestamp::from_unix_time(u64::MAX, 1_000_000_000, 0, 0))
still aborts. Build the Duration from its parts with checked arithmetic
so both steps are guarded.
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.

Panic in From<Timestamp> for SystemTime

1 participant