Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add UTC timezone info to message.timestamp. #4129

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ def from_message(cls, message: "Message", flow_id: str | UUID | None = None):
message.files = image_paths

if isinstance(message.timestamp, str):
timestamp = datetime.fromisoformat(message.timestamp)
# The message.timestamp is created using strftime("%Y-%m-%dT%H:%M:%S").
# This format is not fully ISO 8601 compliant because it lacks timezone information.
# Aadd timezone info (UTC) back to the timestamp here.
timestamp = datetime.fromisoformat(message.timestamp).replace(tzinfo=timezone.utc)
else:
timestamp = message.timestamp
if not flow_id and message.flow_id:
Expand Down
Loading