Skip to content

Commit 4a495c2

Browse files
committed
Fix Python 3.8-3.10 compatibility
- Replace datetime.UTC (3.11+) with datetime.timezone.utc (3.2+) - Ensures compatibility with Python 3.8, 3.9, 3.10
1 parent ecbc273 commit 4a495c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ingest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def iso_from_epoch(ts):
3131
if ts is None or ts == 0:
3232
return None
3333
try:
34-
return datetime.datetime.fromtimestamp(float(ts), datetime.UTC).replace(microsecond=0).isoformat()
34+
return datetime.datetime.fromtimestamp(float(ts), datetime.timezone.utc).replace(microsecond=0).isoformat()
3535
except Exception:
3636
return None
3737

0 commit comments

Comments
 (0)