Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
Fix wrong minutes per hour
  • Loading branch information
penut85420 authored Jan 14, 2021
1 parent ba971ef commit 636dad2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion penut/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def timedelta2string(delta, fmt=None):
fmt = lambda h, m, s: f'{h:02d}:{m:02d}:{s:02d}'
total_seconds = delta.total_seconds()
minutes, seconds = divmod(total_seconds, 60)
hours, minutes = divmod(minutes, 24)
hours, minutes = divmod(minutes, 60)
hours, minutes, seconds = map(int, (hours, minutes, seconds))
return fmt(hours, minutes, seconds)

Expand Down

0 comments on commit 636dad2

Please sign in to comment.