Merge pull request #1881 from Integral-Tech/fix-human-duration

Fix number of hours in human-readable duration
This commit is contained in:
DeepBlueV7.X 2025-03-04 23:58:01 +01:00 committed by GitHub
commit 2b94ff8680
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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();