fix: UTC-naive timestamps in distribute/db audit trail (V65)
distribute.py created_at, db.py updated_at/claim_fee now use datetime.now(timezone.utc).replace(tzinfo=None) to match V62 scan stamps and eliminate WIB (UTC+7) drift in payment/claim records.
This commit is contained in:
1 parent
5c1c7572d3
commit
9e092ebdbc
3 files changed
+7
-6
No files matched your search
+2
-2
@@ -15,7 +15,7 @@ beri node/Hyperion waktu mengejar indeks + meratakan beban broadcast.
|
||||
|
||||
import sys
|
||||
import time
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timezone
|
||||
from decimal import Decimal, ROUND_FLOOR, InvalidOperation
|
||||
|
||||
import requests
|
||||
@@ -275,7 +275,7 @@ def run_distribution(dry_run=False):
|
||||
total_share = sum(share for _, share in shares)
|
||||
telegram.notify_start(run_date, len(shares), total_share, balance)
|
||||
|
||||
created_at = datetime.now().isoformat(timespec='seconds')
|
||||
created_at = datetime.now(timezone.utc).replace(tzinfo=None).isoformat(timespec='seconds')
|
||||
total_stake = sum(float(s) for _, s in voters)
|
||||
run_id = db.record_run(run_date, float(balance), len(voters), total_stake,
|
||||
0.0, 'ok', created_at)
|
||||
|
||||
Reference in new issue
Block a user