瀏覽代碼

chore: remove windows platform timezone set (#8712)

非法操作 6 月之前
父節點
當前提交
9ca2e2c968
共有 1 個文件被更改,包括 3 次插入5 次删除
  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()