fix(d2): datetime.now(UTC) everywhere + SQLITE-001 automation tests on ephemeral postgres
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
This commit is contained in:
+2
-2
@@ -6,7 +6,7 @@ import csv
|
||||
import io
|
||||
import json
|
||||
import uuid
|
||||
from datetime import datetime, timedelta
|
||||
from datetime import UTC, datetime, timedelta
|
||||
|
||||
from fastapi import APIRouter, Depends, HTTPException, Query
|
||||
from fastapi.responses import StreamingResponse
|
||||
@@ -167,7 +167,7 @@ async def audit_retention_cleanup(
|
||||
Default retention: 365 days.
|
||||
"""
|
||||
tenant_id = uuid.UUID(current_user["tenant_id"])
|
||||
cutoff = datetime.utcnow() - timedelta(days=retention_days)
|
||||
cutoff = datetime.now(UTC) - timedelta(days=retention_days)
|
||||
|
||||
q = delete(AuditLog).where(
|
||||
AuditLog.tenant_id == tenant_id,
|
||||
|
||||
Reference in New Issue
Block a user