Skip to content

Commit

Permalink
fix: utcfromtimestamp is Deprecated change to new api (#12120)
Browse files Browse the repository at this point in the history
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
  • Loading branch information
yihong0618 authored Jan 2, 2025
1 parent e58e573 commit 3d150c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/extensions/ext_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3d150c3

Please sign in to comment.