From c4753245fe0b095d0206db48aecf003dfec5aedb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Beyreuther?= Date: Tue, 2 Jul 2024 13:30:50 +0200 Subject: [PATCH] transformed ISO Time into POSIX timestamp (#80) --- pytr/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pytr/utils.py b/pytr/utils.py index 08865eb..0097c2e 100644 --- a/pytr/utils.py +++ b/pytr/utils.py @@ -351,7 +351,8 @@ async def _get_timeline_details(self, num_torequest, max_age_timestamp=0): action = event.get('action') # icon = event.get('icon') msg = '' - if max_age_timestamp != 0 and event['timestamp'] > max_age_timestamp: + timestamp = timestamp = datetime.fromisoformat(event['timestamp']).timestamp() + if max_age_timestamp != 0 and timestamp > max_age_timestamp: msg += 'Skip: too old' # elif icon is None: # pass