diff --git a/backend/tools/audit.py b/backend/tools/audit.py index cf39f16..62279f4 100644 --- a/backend/tools/audit.py +++ b/backend/tools/audit.py @@ -7,7 +7,7 @@ Reuses the application audit log (``data/audit.log``, JSON lines) and adds an from __future__ import annotations -from datetime import datetime, timezone +from datetime import UTC, datetime from typing import Any from backend.audit import _write_entry @@ -41,7 +41,7 @@ def log_tool_call( ) -> None: """Append an ``ai_tool_call`` entry to the audit log.""" _write_entry({ - "timestamp": datetime.now(timezone.utc).isoformat(), + "timestamp": datetime.now(UTC).isoformat(), "action": "ai_tool_call", "username": username, "ip": ip or "unknown",