Fix tz issue observer (#1725)

This commit is contained in:
Shuchang Zheng
2025-02-05 23:37:12 +08:00
committed by GitHub
parent 25230b34aa
commit b4bdcfd53c

View File

@@ -1136,7 +1136,7 @@ async def mark_observer_task_as_completed(
)
# Track observer cruise duration when completed
duration_seconds = (datetime.now(UTC) - observer_task.created_at).total_seconds()
duration_seconds = (datetime.now(UTC) - observer_task.created_at.replace(tzinfo=UTC)).total_seconds()
LOG.info(
"Observer cruise duration metrics",
observer_cruise_id=observer_cruise_id,