Skip to content

Commit

Permalink
Also parse Z with strptime
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker committed Sep 19, 2024
1 parent b9e2c16 commit 23034b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def test_breadcrumb_ordering(sentry_init, capture_events):
assert len(event["breadcrumbs"]["values"]) == len(timestamps)
timestamps_from_event = [
datetime.datetime.strptime(
x["timestamp"].replace("Z", ""), "%Y-%m-%dT%H:%M:%S.%f"
x["timestamp"], "%Y-%m-%dT%H:%M:%S.%fZ"
).replace(tzinfo=datetime.timezone.utc)
for x in event["breadcrumbs"]["values"]
]
Expand Down Expand Up @@ -451,7 +451,7 @@ def test_breadcrumb_ordering_different_types(sentry_init, capture_events):
assert len(event["breadcrumbs"]["values"]) == len(timestamps)
timestamps_from_event = [
datetime.datetime.strptime(
x["timestamp"].replace("Z", ""), "%Y-%m-%dT%H:%M:%S.%f"
x["timestamp"], "%Y-%m-%dT%H:%M:%S.%fZ"
).replace(tzinfo=datetime.timezone.utc)
for x in event["breadcrumbs"]["values"]
]
Expand Down

0 comments on commit 23034b6

Please sign in to comment.