Skip to content

Conversation

@cvengler
Copy link
Contributor

This commit implements the following methods:

  • SystemTime::saturating_add
  • SystemTime::saturating_sub
  • SystemTime::saturating_duration_since

The implementation of these methods is rather trivial, as the main logic lies behind the constants SystemTime::MIN and SystemTime::MAX.

See also:

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 16, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 16, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot

This comment has been minimized.

@cvengler cvengler force-pushed the time_saturating_systemtime branch from ff52527 to 7951768 Compare January 16, 2026 09:45
@SpriteOvO SpriteOvO added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Jan 16, 2026
@rust-log-analyzer

This comment has been minimized.

This commit implements the following methods:
* `SystemTime::saturating_add`
* `SystemTime::saturating_sub`
* `SystemTime::saturating_duration_since`

The implementation of these methods is rather trivial, as the main logic
lies behind the constants `SystemTime::MIN` and `SystemTime::MAX`.
@cvengler cvengler force-pushed the time_saturating_systemtime branch from 7951768 to 567b569 Compare January 16, 2026 10:52
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 17, 2026

📌 Commit 567b569 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 17, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Jan 18, 2026
…-Simulacrum

time: Add saturating arithmetic for `SystemTime`

This commit implements the following methods:
* `SystemTime::saturating_add`
* `SystemTime::saturating_sub`
* `SystemTime::saturating_duration_since`

The implementation of these methods is rather trivial, as the main logic lies behind the constants `SystemTime::MIN` and `SystemTime::MAX`.

See also:
* Accepted ACP: rust-lang/libs-team#718
* Tracking Issue: rust-lang#151199
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants