From 3d150c30a7af2a4d0b402d5c83460df546e1e1e9 Mon Sep 17 00:00:00 2001 From: yihong Date: Thu, 2 Jan 2025 18:52:36 +0800 Subject: [PATCH] fix: utcfromtimestamp is Deprecated change to new api (#12120) Signed-off-by: yihong0618 --- api/extensions/ext_logging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/extensions/ext_logging.py b/api/extensions/ext_logging.py index e1c459e8c1..1b9e78828d 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: