diff options
| author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2023-08-07 15:45:47 +0100 |
|---|---|---|
| committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2023-08-07 15:45:47 +0100 |
| commit | c4bc16c5d60ccaebbd975ce5e7bcde661045951c (patch) | |
| tree | 08964b44769b487a320654302471fd256f55808d /library/std/src/time.rs | |
| parent | e329b23104177561a11bb675ea8c77553f2fbcc7 (diff) | |
| download | rust-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
Diffstat (limited to 'library/std/src/time.rs')
| -rw-r--r-- | library/std/src/time.rs | 14 |
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 /// |
