diff --git a/recce/event/collector.py b/recce/event/collector.py index 0e0a5413..496ffc8a 100644 --- a/recce/event/collector.py +++ b/recce/event/collector.py @@ -6,7 +6,7 @@ from contextlib import contextmanager from datetime import datetime from json import JSONDecodeError -from zoneinfo import ZoneInfo +from datetime import timezone import portalocker import requests @@ -89,8 +89,8 @@ def log_event(self, event_prop, event_type, event_triggered_at: datetime = None, if event_triggered_at is None: created_at = datetime.now() else: - # Convert to GMT timezone - created_at = event_triggered_at.astimezone(ZoneInfo("GMT")) + # Convert to UTC timezone + created_at = event_triggered_at.astimezone(timezone.utc) python_version = f'{sys.version_info.major}.{sys.version_info.minor}' # when the recce is running in automation use cases