From 9ca2e2c96896e038a9e676aed5f355fd54188591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Tue, 24 Sep 2024 17:33:29 +0800 Subject: [PATCH] chore: remove windows platform timezone set (#8712) --- api/app.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/api/app.py b/api/app.py index 91a49337fc..1b58beee15 100644 --- a/api/app.py +++ b/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()