Skip to content

Commit c552db6

Browse files
committed
Fix last seen edge case
1 parent beb14c8 commit c552db6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/n2n-ctl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ def str_table(rows, columns, orderby):
174174

175175
def num2timestr(seconds):
176176
"""Convert a number of seconds into a human time"""
177+
178+
if seconds == 0:
179+
return "now"
180+
177181
days, seconds = divmod(seconds, (60*60*24))
178182
hours, seconds = divmod(seconds, (60*60))
179183
minutes, seconds = divmod(seconds, 60)

0 commit comments

Comments
 (0)