Round timestamps to whole minutes on creation

The displayed timestamps were always floored, as were calculated
difference and its sum, which meant a duration that seemed like 1 hour
was more often than not displayed as 0:59 instead of 1:00.
This commit is contained in:
FichteFoll 2021-12-10 12:09:37 +01:00
parent 2e35ff377b
commit 76e764b706

View File

@ -35,7 +35,8 @@ impl TimePoint {
}
fn now() -> Time {
OffsetDateTime::now_local().time()
let raw_time = OffsetDateTime::now_local().time();
Time::try_from_hms(raw_time.hour(), raw_time.minute(), 0).unwrap()
}
impl fmt::Display for TimePoint {