making last_seen to a relative date

This commit is contained in:
Kadir 2025-02-14 21:21:50 +00:00
parent 29c8d1960b
commit bb765a9312

View file

@ -220,7 +220,8 @@ class Listing:
with open(self.path_last_seen_listing(), 'r') as f: with open(self.path_last_seen_listing(), 'r') as f:
datetime_str = json.load(f) datetime_str = json.load(f)
return datetime.fromisoformat(datetime_str) dt = datetime.datetime.fromisoformat(datetime_str)
return (datetime.datetime.now() - dt).days
@property @property
def serviceCharge(self) -> float: def serviceCharge(self) -> float: