Code Issues Pull Requests Actions Packages Projects Releases 15 Wiki Activity Security Code Quality

Update badge awarding script to use timezone-aware datetime for cache updates, ensuring consistent timestamp formatting.
Gitea badges / award (push) Successful in 16s
Release / Release (push) Successful in 8s

This commit is contained in:
tienbh committed 2026-11-19 12:07:05 +07:00
1 parent 243eea2aa3
commit 705fdbcb8f
1 file changed
+2 -2
+2 -2
View File
@@ -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: