fix: replace deprecated datetime.utcnow() with datetime.now(datetime.UTC)
- Replace all 2,087 uses of datetime.utcnow() across 294 files - Add UTC import to datetime statements where needed - Addresses Python 3.12+ deprecation warning (report item #3)
This commit is contained in:
@@ -9,7 +9,7 @@ import sys
|
||||
import json
|
||||
import subprocess
|
||||
import logging
|
||||
from datetime import datetime
|
||||
from datetime import datetime, UTC
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Any, Tuple
|
||||
import hashlib
|
||||
@@ -25,7 +25,7 @@ class SecurityAudit:
|
||||
def __init__(self, project_root: str = "/opt/aitbc"):
|
||||
self.project_root = Path(project_root)
|
||||
self.results = {
|
||||
"timestamp": datetime.utcnow().isoformat(),
|
||||
"timestamp": datetime.now(datetime.UTC).isoformat(),
|
||||
"audit_version": "v0.2.0",
|
||||
"findings": [],
|
||||
"score": 0,
|
||||
|
||||
Reference in New Issue
Block a user