about summary refs log tree commit diff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2023-08-07 15:45:47 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2023-08-07 15:45:47 +0100
commitc4bc16c5d60ccaebbd975ce5e7bcde661045951c (patch)
tree08964b44769b487a320654302471fd256f55808d
parente329b23104177561a11bb675ea8c77553f2fbcc7 (diff)
downloadrust-c4bc16c5d60ccaebbd975ce5e7bcde661045951c.tar.gz
rust-c4bc16c5d60ccaebbd975ce5e7bcde661045951c.zip
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
-rw-r--r--library/std/src/time.rs14
1 files 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
 ///