Skip to content

Commit 9a7f5f4

Browse files
authored
fix timestamp issues (#83)
1 parent c8d5800 commit 9a7f5f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pytr/utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,8 @@ async def _get_timeline_details(self, num_torequest, max_age_timestamp=0):
351351
action = event.get('action')
352352
# icon = event.get('icon')
353353
msg = ''
354-
if max_age_timestamp != 0 and event['timestamp'] > max_age_timestamp:
354+
timestamp_field = datetime.fromisoformat(event['timestamp'][:19]).timestamp()
355+
if max_age_timestamp != 0 and timestamp_field > max_age_timestamp:
355356
msg += 'Skip: too old'
356357
# elif icon is None:
357358
# pass

0 commit comments

Comments
 (0)