Fixing math used to calculate human_duration

There are 86400 seconds in a day
This commit is contained in:
o 2017-04-22 19:27:31 -04:00 committed by GitHub
parent e85cdd5609
commit 1c50e615cf

View file

@ -204,10 +204,10 @@ def human_duration(s, sig='dhms'):
hd = ''
if str(s).isdigit() and s > 0:
d = int(s / 84600)
h = int((s % 84600) / 3600)
m = int(((s % 84600) % 3600) / 60)
s = int(((s % 84600) % 3600) % 60)
d = int(s / 86400)
h = int((s % 86400) / 3600)
m = int(((s % 86400) % 3600) / 60)
s = int(((s % 86400) % 3600) % 60)
hd_list = []
if sig >= 'd' and d > 0: