forked from kageru/tracc
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:
parent
2e35ff377b
commit
76e764b706
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user