From c4bc16c5d60ccaebbd975ce5e7bcde661045951c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 7 Aug 2023 15:45:47 +0100 Subject: [PATCH] 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 https://github.com/rust-lang/rust/pull/109660#pullrequestreview-1414613118 --- library/std/src/time.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/library/std/src/time.rs b/library/std/src/time.rs index fae677e5729..63f04bb8829 100644 --- a/library/std/src/time.rs +++ b/library/std/src/time.rs @@ -479,11 +479,10 @@ impl SystemTime { /// measurement lies, and using `UNIX_EPOCH + duration` can be used to create a /// `SystemTime` instance to represent another fixed point in time. /// - /// `duration_since(UNIX_EPOCH).unwrap().as_secs()` - /// returns a POSIX `time_t` (as a `u64`): + /// `duration_since(UNIX_EPOCH).unwrap().as_secs()` returns /// the number of non-leap seconds since the start of 1970 UTC. - /// This is the same time representation as used in many Internet protocols, - /// for example: JWT, CBOR, TOTP, certificate transparency and DNS TSIG/DNSSEC. + /// This is a POSIX `time_t` (as a `u64`), + /// and is the same time representation as used in many Internet protocols. /// /// # Examples /// @@ -644,11 +643,10 @@ impl fmt::Debug for SystemTime { /// measurement lies, and using `UNIX_EPOCH + duration` can be used to create a /// [`SystemTime`] instance to represent another fixed point in time. /// -/// `duration_since(UNIX_EPOCH).unwrap().as_secs()` -/// returns a POSIX `time_t` (as a `u64`): +/// `duration_since(UNIX_EPOCH).unwrap().as_secs()` returns /// the number of non-leap seconds since the start of 1970 UTC. -/// This is the same time representation as used in many Internet protocols, -/// for example: JWT, CBOR, TOTP, certificate transparency and DNS TSIG/DNSSEC. +/// This is a POSIX `time_t` (as a `u64`), +/// and is the same time representation as used in many Internet protocols. /// /// # Examples ///