From d9017d447adbe04704d031b5d3573ad6ca6d72a6 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Tue, 24 May 2022 11:49:36 +0200 Subject: [PATCH] [Bugfix] Fix seconds value returned by get_hms() --- src/clock.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clock.rs b/src/clock.rs index 32e9493..59c76e4 100644 --- a/src/clock.rs +++ b/src/clock.rs @@ -90,7 +90,7 @@ pub fn get_hms(config: &Option, which: DayPart) -> (u8, u8, u8) { let hours = seconds / 3600; seconds -= hours * 3600; let minutes = seconds / 60; - seconds -= hours * 60; + seconds -= minutes * 60; (hours as u8, minutes as u8, seconds as u8) }