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: the date is incorrect if the db field is timestamp and the TZ is not the UTC (#4624)

liuzhenghuaad620f02c726
diff --git a/api/config.py b/api/config.py
index 07881c363ab..5ec2f6771c3 100644
--- a/api/config.py
+++ b/api/config.py
@@ -179,7 +179,8 @@ class Config:
'pool_size': int(get_env('SQLALCHEMY_POOL_SIZE')),
'max_overflow': int(get_env('SQLALCHEMY_MAX_OVERFLOW')),
'pool_recycle': int(get_env('SQLALCHEMY_POOL_RECYCLE')),
- 'pool_pre_ping': get_bool_env('SQLALCHEMY_POOL_PRE_PING')
+ 'pool_pre_ping': get_bool_env('SQLALCHEMY_POOL_PRE_PING'),
+ 'connect_args': {'options': '-c timezone=UTC'},
}
self.SQLALCHEMY_ECHO = get_bool_env('SQLALCHEMY_ECHO')