fix(datetime): replace deprecated utcnow() with timezone-aware equivalent (#15)
CI / Backend Tests (Python 3.10) (push) Canceled after 0s
CI / Backend Tests (Python 3.11) (push) Canceled after 0s
CI / Backend Tests (Python 3.12) (push) Canceled after 0s
CI / Frontend Build & Typecheck (push) Canceled after 0s

- Replaced datetime.utcnow() with datetime.now(timezone.utc) in router and observability modules
- Preserves backwards compatibility with Python 3.10+
- Fixes #14
This commit is contained in:
Sanaullah Turab
2026-09-11 19:18:56 +05:30
committed by GitHub
parent 077b3e2af4
commit d737946aac
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import uuid
import uuid
import datetime
from typing import List, Dict, Any, Optional
from app.models.schemas import (
@@ -64,7 +64,7 @@ def route_request(
) -> RoutingDecision:
req_id = request_id or str(uuid.uuid4())
decision_id = f"dec_{uuid.uuid4().hex[:12]}"
now_iso = datetime.datetime.utcnow().isoformat()
now_iso = datetime.datetime.now(datetime.timezone.utc).isoformat()
# 1. Rule evaluation
rule_action, rule_target, rule_name = None, None, None