From 51ec6d34eadbfea406444c3a232e90f8999e3e7f Mon Sep 17 00:00:00 2001 From: Andrew <15331990+ahuang11@users.noreply.github.com> Date: Tue, 26 Dec 2023 08:47:04 -0800 Subject: [PATCH] Fix browser timezone meessage (#6122) --- panel/chat/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/chat/message.py b/panel/chat/message.py index 229c6f3a22..bb93b0d8f3 100644 --- a/panel/chat/message.py +++ b/panel/chat/message.py @@ -222,7 +222,7 @@ def __init__(self, object=None, **params): tz = params.get("timestamp_tz") if tz is not None: tz = ZoneInfo(tz) - elif state.browser_info.timezone: + elif state.browser_info and state.browser_info.timezone: tz = ZoneInfo(state.browser_info.timezone) params["timestamp"] = datetime.datetime.now(tz=tz) reaction_icons = params.get("reaction_icons", {"favorite": "heart"})