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 and philippjfr committed Jan 17, 2024
1 parent a0a3447 commit 51ec6d3
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 51ec6d3

Please sign in to comment.