Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/sentry/monitors/consumers/monitor_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ def _process_checkin(item: CheckinItem, txn: Transaction | Span) -> None:
#
# XXX: They are NOT timezone aware date times, set the timezone
# to UTC
clock_time = item.ts.replace(tzinfo=UTC)
clock_time = item.ts.replace(second=0, microsecond=0, tzinfo=UTC)

# Record the reported in_progress time when the check is in progress
date_in_progress = start_time if status == CheckInStatus.IN_PROGRESS else None
Expand Down
2 changes: 1 addition & 1 deletion tests/sentry/monitors/consumers/test_monitor_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def test_check_in_date_clock(self):
self.send_checkin(monitor.slug, ts=ts, item_ts=item_ts)
checkin = MonitorCheckIn.objects.get(guid=self.guid)
assert checkin.date_added == ts.replace(tzinfo=UTC)
assert checkin.date_clock == item_ts.replace(tzinfo=UTC)
assert checkin.date_clock == item_ts.replace(second=0, microsecond=0, tzinfo=UTC)

def test_check_in_date_in_progress(self):
monitor = self._create_monitor(slug="my-monitor")
Expand Down
Loading