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: utcfromtimestamp is Deprecated change to new api (#12120)

yihong3d150c30a7af
diff --git a/api/extensions/ext_logging.py b/api/extensions/ext_logging.py
index e1c459e8c17..1b9e78828db 100644
--- a/api/extensions/ext_logging.py
+++ b/api/extensions/ext_logging.py
@@ -46,7 +46,7 @@ def init_app(app: DifyApp):
timezone = pytz.timezone(log_tz)
def time_converter(seconds):
- return datetime.utcfromtimestamp(seconds).astimezone(timezone).timetuple()
+ return datetime.fromtimestamp(seconds, tz=timezone).timetuple()
for handler in logging.root.handlers:
if handler.formatter: