Integer seconds

This commit is contained in:
John Doty 2024-07-12 07:46:56 +09:00
parent 64b24388d8
commit 33b998236b

View file

@ -295,7 +295,7 @@ class Entry:
return Entry(id=id, inserted_at=insert_time, title=title, link=link)
def time_ago(self) -> str:
inserted = self.inserted_at / 1000
inserted = int(self.inserted_at / 1000)
seconds = int(time.time()) - inserted
if seconds <= 90:
return f"{seconds}s"