Skip to content

Commit c0baa6f

Browse files
committed
library: Link to UNIX_EPOCH in SystemTime::MIN
This commit links to `SystemTime::UNIX_EPOCH` in the documentation of `SystemTime::MIN` and outlines the difference between these two.
1 parent 348d684 commit c0baa6f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

library/std/src/time.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,12 @@ impl SystemTime {
536536
/// This value differs a lot between platforms, but it is always the case
537537
/// that any positive subtraction from [`SystemTime::MIN`] will fail.
538538
///
539+
/// Depending on the platform, this may be either less than or equal to
540+
/// [`SystemTime::UNIX_EPOCH`], depending on whether the operating system
541+
/// supports the representation of timestamps before the Unix epoch or not.
542+
/// However, it is always guaranteed that a [`SystemTime::UNIX_EPOCH`] fits
543+
/// between a [`SystemTime::MIN`] and [`SystemTime::MAX`].
544+
///
539545
/// # Examples
540546
///
541547
/// ```

0 commit comments

Comments
 (0)