Skip to content

Commit

Permalink
Fix browser timezone meessage (#6122)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuang11 authored Dec 26, 2023
1 parent b45b07a commit 6a4d7f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion panel/chat/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"})
Expand Down

0 comments on commit 6a4d7f3

Please sign in to comment.