Skip to content

Commit

Permalink
pybind/mgr/mgr_util: fix pretty time delta
Browse files Browse the repository at this point in the history
We were off by a factor of 10 with teh 'hours' values.  Oops!

Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
liewegas committed Mar 6, 2020
1 parent 234b4eb commit 822ee34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pybind/mgr/mgr_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def to_pretty_timedelta(n):
if n < datetime.timedelta(minutes=120):
return str(n.seconds // 60) + 'm'
if n < datetime.timedelta(hours=48):
return str(n.seconds // 360) + 'h'
return str(n.seconds // 3600) + 'h'
if n < datetime.timedelta(days=14):
return str(n.days) + 'd'
if n < datetime.timedelta(days=7*12):
Expand Down

0 comments on commit 822ee34

Please sign in to comment.