Browse Source

Fix logbook clock-summary

Current implementation does not correctly handle the carrying up to hours. E.g., for logbook records `0:30:30` and `0:29:30`, it would return `00:00:00`.
Shotaro Yamada 3 years ago
parent
commit
2b2fc92c4b
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/main/frontend/util/clock.cljs

+ 1 - 2
src/main/frontend/util/clock.cljs

@@ -95,8 +95,7 @@
               seconds (mod reduced-seconds 60)
               minutes (mod (+ reduced-minutes (quot reduced-seconds 60)) 60)
               hours (+ reduced-hours
-                       (quot reduced-minutes 60)
-                       (quot (+ (mod reduced-minutes 60) reduced-seconds) 3600))]
+                       (quot (+ reduced-minutes (quot reduced-seconds 60)) 60))]
           (if string?
             (util/format "%s%s%s"
                          (if (>= hours 1)