2026-02-09 15:49:50 +05:30
|
|
|
"""Time-related helpers shared across backend modules."""
|
|
|
|
|
|
2026-02-06 16:12:04 +05:30
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
|
|
from datetime import UTC, datetime
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def utcnow() -> datetime:
|
|
|
|
|
"""Return a naive UTC datetime without using deprecated datetime.utcnow()."""
|
|
|
|
|
# Keep naive UTC values for compatibility with existing DB schema/queries.
|
|
|
|
|
return datetime.now(UTC).replace(tzinfo=None)
|