fix(api): patch Windows timezone set (#1575)

This commit is contained in:
Rhon Joe authored and GitHub committed 2023-11-21 11:49:07 +08:00
1 parent 5b7071e4b0
commit 7cda3fe85b
1 file changed
+6 -2
+6 -2
View File
@@ -37,8 +37,12 @@ from libs.passport import PassportService
import warnings
warnings.simplefilter("ignore", ResourceWarning)
os.environ['TZ'] = 'UTC'
time.tzset()
# fix windows platform
if os.name == "nt":
os.system('tzutil /s "UTC"')
else:
os.environ['TZ'] = 'UTC'
time.tzset()
class DifyApp(Flask):