diff --git a/aprsd/utils.py b/aprsd/utils.py index 295de97..14b47ff 100644 --- a/aprsd/utils.py +++ b/aprsd/utils.py @@ -399,6 +399,9 @@ def strfdelta(tdelta, fmt="{hours:{width}}:{minutes:{width}}:{seconds:{width}}") "days": tdelta.days, "width": "02", } + if tdelta.days > 0: + fmt = "{days} days " + fmt + d["hours"], rem = divmod(tdelta.seconds, 3600) d["minutes"], d["seconds"] = divmod(rem, 60) return fmt.format(**d)