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:
@@ -18,7 +18,7 @@ import base64
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from datetime import datetime
|
||||
from datetime import datetime, UTC
|
||||
from typing import Dict, List, Any, Optional
|
||||
|
||||
from cryptography.hazmat.primitives.asymmetric import ed25519
|
||||
@@ -233,7 +233,7 @@ def initialize_genesis_database(genesis_block: Dict, allocations: List[Dict], db
|
||||
alloc["address"],
|
||||
alloc["balance"],
|
||||
alloc["nonce"],
|
||||
datetime.utcnow().isoformat()
|
||||
datetime.now(datetime.UTC).isoformat()
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user