Unverified Commit 7cda3fe8 authored by Rhon Joe's avatar Rhon Joe Committed by GitHub

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

parent 5b7071e4
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment