make human readable time actually human readable
This commit is contained in:
parent
89edb0a6d7
commit
12f3e58d85
@ -120,16 +120,16 @@ def human_readable_time_from_delta(delta: datetime.timedelta) -> str:
|
||||
time_str += "%d day%s, " % (delta.days, "s" if delta.days > 1 else "")
|
||||
|
||||
if delta.seconds > 3600:
|
||||
time_str += "%02d:" % (delta.seconds // 3600)
|
||||
time_str += "%02d hours, " % (delta.seconds // 3600)
|
||||
else:
|
||||
time_str += "00:"
|
||||
time_str += ""
|
||||
|
||||
if delta.seconds % 3600 > 60:
|
||||
time_str += "%02d:" % (delta.seconds % 3600 // 60)
|
||||
time_str += "%02d minutes, " % (delta.seconds % 3600 // 60)
|
||||
else:
|
||||
time_str += "00:"
|
||||
time_str += ""
|
||||
|
||||
return time_str + "%02d" % (delta.seconds % 60)
|
||||
return time_str + "%02d seconds" % (delta.seconds % 60)
|
||||
|
||||
|
||||
def human_readable_time_from_ns(ns: int) -> str:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user