fix: utcfromtimestamp is Deprecated change to new api (#12120)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
yihong 2025-01-02 18:52:36 +08:00 committed by GitHub
parent e58e573f3e
commit 3d150c30a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: