refactor: use datetime.UTC alias instead of timezone.utc

Python 3.11 introduced datetime.UTC as a cleaner alias for
datetime.timezone.utc. Both build.py and fetch_github_stars.py
are updated to use the shorter form.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Vinta Chen
2026-04-19 21:54:55 +08:00
parent e47d229528
commit a358d45ca4
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -4,7 +4,7 @@
import json
import re
import shutil
from datetime import datetime, timezone
from datetime import UTC, datetime
from pathlib import Path
from typing import TypedDict
@@ -189,7 +189,7 @@ def build(repo_root: str) -> None:
total_entries=total_entries,
total_categories=len(categories),
repo_stars=repo_stars,
build_date=datetime.now(timezone.utc).strftime("%B %d, %Y"),
build_date=datetime.now(UTC).strftime("%B %d, %Y"),
sponsors=sponsors,
),
encoding="utf-8",