Fix rounding of seconds on home stats

This commit is contained in:
JonnyWong16 2021-06-05 09:48:39 -07:00
parent 092d858b12
commit b9c1dccf48
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -58,6 +58,8 @@ DOCUMENTATION :: END
# Human readable duration
def hd(seconds):
m, s = divmod(cast_to_int(seconds), 60)
if s > 30:
m += 1
h, m = divmod(m, 60)
return str(h).zfill(1) + ':' + str(m).zfill(2)
%>