Fix last seen edge case

This commit is contained in:
Hamish Coleman 2023-09-06 13:38:18 +01:00
parent beb14c8d70
commit c552db6443

View File

@ -174,6 +174,10 @@ def str_table(rows, columns, orderby):
def num2timestr(seconds):
"""Convert a number of seconds into a human time"""
if seconds == 0:
return "now"
days, seconds = divmod(seconds, (60*60*24))
hours, seconds = divmod(seconds, (60*60))
minutes, seconds = divmod(seconds, 60)