mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 17:36:20 +00:00
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