mirror of
https://github.com/ntop/n2n.git
synced 2024-11-01 05:07:57 +05:30
Fix last seen edge case
This commit is contained in:
parent
beb14c8d70
commit
c552db6443
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user