增加时区

This commit is contained in:
18610128193
2026-07-03 11:49:30 +08:00
parent 778a89cabb
commit 1705c992e8
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ class DouyinRequest:
token = cache.get("token")
expired_at_str = cache.get("expired_at")
if token and expired_at_str:
expired_at = datetime.fromisoformat(expired_at_str)
expired_at = datetime.fromisoformat(expired_at_str).replace(tzinfo=timezone.utc)
if expired_at > datetime.now(timezone.utc):
return token
except Exception as e: