Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

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

Rhon Joe7cda3fe85b1d
diff --git a/api/app.py b/api/app.py
index 4b7c35e91a8..a0a09994dfd 100644
--- a/api/app.py
+++ b/api/app.py
@@ -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):