Update badge awarding script to use timezone-aware datetime for cache updates, ensuring consistent timestamp formatting.
This commit is contained in:
1 parent
243eea2aa3
commit
705fdbcb8f
1 file changed
+2
-2
@@ -34,7 +34,7 @@ import urllib.parse
|
||||
import urllib.request
|
||||
from collections import Counter, defaultdict
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timezone
|
||||
|
||||
from s3cache import S3Object
|
||||
|
||||
@@ -481,7 +481,7 @@ def main():
|
||||
try:
|
||||
size = store.save_json({"version": CACHE_VERSION,
|
||||
"settings": {"quickdraw_seconds": cfg["quickdraw_seconds"]},
|
||||
"updated_at": datetime.utcnow().isoformat() + "Z",
|
||||
"updated_at": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"),
|
||||
"repos": new_repos})
|
||||
print(f"cache: saved {len(new_repos)} repos ({size} bytes) to {store.label}")
|
||||
except Exception as e:
|
||||
|
||||
Reference in new issue
Block a user