fix: Use timezone.utc instead of UTC for Python 3.10 compatibility

The UTC constant was added in Python 3.11. Changed to use
timezone.utc which is available in Python 3.10+.

Fixed ImportError: cannot import name 'UTC' from 'datetime'
This commit is contained in:
Daniel Chalef 2025-10-29 22:46:17 -07:00
parent 736e5e21a2
commit d940b6fb7d

View file

@ -3,7 +3,7 @@
import asyncio
import logging
from collections.abc import Awaitable, Callable
from datetime import UTC, datetime
from datetime import datetime, timezone
from typing import Any
logger = logging.getLogger(__name__)
@ -137,7 +137,7 @@ class QueueService:
source_description=source_description,
source=episode_type,
group_id=group_id,
reference_time=datetime.now(UTC),
reference_time=datetime.now(timezone.utc),
entity_types=entity_types,
uuid=uuid,
)