Files
rust/library
Jonathan Brouwer 6c04f17c6f Rollup merge of #162199 - sorairolake:clarify-hour-minute-seconds, r=jhpratt
docs(time): clarify exact seconds for hour and minute

Documented that `Duration::from_hours` defines one hour as 3,600 seconds (60 minutes), and `Duration::from_mins` defines one minute as 60 seconds.

Doctests for these methods also appear to be based on these definitions.

The purpose of this is to clarify that `Duration` is a fixed length value that ignores factors such as a leap second.

This is inspired by <https://github.com/rust-lang/libs-team/issues/869#issuecomment-5500049965>.

It seems that no library in Rust handle leap seconds, so there isn't much point in documenting this. However, I don't think it would hurt to include it for the sake of consistency with rust-lang/rust#162195.

See also rust-lang/rust#120301

@rustbot label +A-docs
2026-09-03 20:02:58 +02:00
..
2026-08-19 09:27:38 -07:00
2026-08-25 18:15:16 +00:00