mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-13 04:28:58 +08:00
fix(api): patch Windows timezone set (#1575)
This commit is contained in:
parent
5b7071e4b0
commit
7cda3fe85b
@ -37,8 +37,12 @@ from libs.passport import PassportService
|
|||||||
import warnings
|
import warnings
|
||||||
warnings.simplefilter("ignore", ResourceWarning)
|
warnings.simplefilter("ignore", ResourceWarning)
|
||||||
|
|
||||||
os.environ['TZ'] = 'UTC'
|
# fix windows platform
|
||||||
time.tzset()
|
if os.name == "nt":
|
||||||
|
os.system('tzutil /s "UTC"')
|
||||||
|
else:
|
||||||
|
os.environ['TZ'] = 'UTC'
|
||||||
|
time.tzset()
|
||||||
|
|
||||||
|
|
||||||
class DifyApp(Flask):
|
class DifyApp(Flask):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user