Skip to content

Commit

Permalink
Formate l'heure avec unité de temps 00h00m00s (zestedesavoir#5268)
Browse files Browse the repository at this point in the history
* Formate l'heure avec unité de temps 00h00m00s
fix synthax error
  • Loading branch information
A-312 authored and artragis committed Feb 4, 2019
1 parent dc99188 commit 9018d8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zds/utils/templatetags/seconds_to_duration.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def seconds_to_duration(value):
return ''

duration = datetime.timedelta(seconds=value)
if duration < 3600
if datetime.timedelta(hours=1) > duration:
return strfdelta(duration, '{minutes}m{seconds}s')
else
return strfdelta(duration, '{hours}h{minutes}m{seconds}s')
else:
return strfdelta(duration, '{hours}h{minutes}m{seconds}s')

0 comments on commit 9018d8f

Please sign in to comment.