Skip to content

Conversation

@david-d-h
Copy link
Contributor

@david-d-h david-d-h commented Jan 26, 2026

This documentation change is meant to clarify that SystemTimes may (platform-dependently) be "less" than the UNIX_EPOCH and a developer ought to take care in comparing between the two, as this might lead to an error. It also explicitly mentions SystemTimeError::duration for when such an error does occur.

I'm not sure on whether it would be helpful to document such a thing on the SystemTime itself rather than on it's methods and assoc consts? Perhaps it could be, since the documentation for the item also mentions the UNIX_EPOCH anchor and encourages comparisons with it. Anyways, open to suggestions.

closes #52522

@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 26, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 26, 2026

r? @joboet

rustbot has assigned @joboet.
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SystemTime conversions invite programmer error

3 participants