Fix number of hours in human-readable duration

The number of hours in human-readable duration is calculated wrongly.

Closes #1878.
This commit is contained in:
Integral 2025-03-04 01:30:40 +08:00
parent 5ce2dcec09
commit a0e00986d7

View file

@ -38,7 +38,7 @@ Rectangle {
var totalSeconds = Math.floor(duration / 1000);
var seconds = totalSeconds % 60;
var minutes = (Math.floor(totalSeconds / 60)) % 60;
var hours = (Math.floor(totalSeconds / (60 * 24))) % 24;
var hours = (Math.floor(totalSeconds / (60 * 60))) % 24;
// Always show minutes and don't prepend zero into the leftmost element
var ss = maybeZeroPrepend(seconds);
var mm = (hours > 0) ? maybeZeroPrepend(minutes) : minutes.toString();