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:
parent
736e5e21a2
commit
d940b6fb7d
1 changed files with 2 additions and 2 deletions
|
|
@ -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,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue