Skip to content

Commit c4bc16c

Browse files
committed
Adjust the duration_since(UNIX_EPOCH) docs
* Make the description primary, not the definition in terms of time_t * Remove the list of Internet protocols As per #109660 (review)
1 parent e329b23 commit c4bc16c

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

library/std/src/time.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -479,11 +479,10 @@ impl SystemTime {
479479
/// measurement lies, and using `UNIX_EPOCH + duration` can be used to create a
480480
/// `SystemTime` instance to represent another fixed point in time.
481481
///
482-
/// `duration_since(UNIX_EPOCH).unwrap().as_secs()`
483-
/// returns a POSIX `time_t` (as a `u64`):
482+
/// `duration_since(UNIX_EPOCH).unwrap().as_secs()` returns
484483
/// the number of non-leap seconds since the start of 1970 UTC.
485-
/// This is the same time representation as used in many Internet protocols,
486-
/// for example: JWT, CBOR, TOTP, certificate transparency and DNS TSIG/DNSSEC.
484+
/// This is a POSIX `time_t` (as a `u64`),
485+
/// and is the same time representation as used in many Internet protocols.
487486
///
488487
/// # Examples
489488
///
@@ -644,11 +643,10 @@ impl fmt::Debug for SystemTime {
644643
/// measurement lies, and using `UNIX_EPOCH + duration` can be used to create a
645644
/// [`SystemTime`] instance to represent another fixed point in time.
646645
///
647-
/// `duration_since(UNIX_EPOCH).unwrap().as_secs()`
648-
/// returns a POSIX `time_t` (as a `u64`):
646+
/// `duration_since(UNIX_EPOCH).unwrap().as_secs()` returns
649647
/// the number of non-leap seconds since the start of 1970 UTC.
650-
/// This is the same time representation as used in many Internet protocols,
651-
/// for example: JWT, CBOR, TOTP, certificate transparency and DNS TSIG/DNSSEC.
648+
/// This is a POSIX `time_t` (as a `u64`),
649+
/// and is the same time representation as used in many Internet protocols.
652650
///
653651
/// # Examples
654652
///

0 commit comments

Comments
 (0)