mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Merge pull request #1021 from senepa/senepa-patch-1
Fixed math used to calculate human_duration
This commit is contained in:
commit
8027199bd5
1 changed files with 4 additions and 4 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue