mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
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
This commit is contained in:
parent
e329b23104
commit
c4bc16c5d6
@ -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
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user