Browse Source

chore: remove windows platform timezone set (#8712)

非法操作 6 months ago
parent
commit
9ca2e2c968
1 changed files with 3 additions and 5 deletions
  1. 3 5
      api/app.py

+ 3 - 5
api/app.py

@@ -53,11 +53,9 @@ from services.account_service import AccountService
 
 warnings.simplefilter("ignore", ResourceWarning)
 
-# fix windows platform
-if os.name == "nt":
-    os.system('tzutil /s "UTC"')
-else:
-    os.environ["TZ"] = "UTC"
+os.environ["TZ"] = "UTC"
+# windows platform not support tzset
+if hasattr(time, "tzset"):
     time.tzset()