mirror of
https://github.com/craigerl/aprsd.git
synced 2025-04-10 05:28:58 -04:00
Added days to uptime string formatting
The uptime string formatter was missing days.
This commit is contained in:
parent
0f384b0e85
commit
2e9b42d7af
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user