From ecddafbe94675c84dbab8d49d3173656f2a82b03 Mon Sep 17 00:00:00 2001 From: Morgan Epp <60796713+epmog@users.noreply.github.com> Date: Thu, 21 Aug 2025 11:26:41 -0500 Subject: [PATCH] test: timezone information was dropped when parsing the cancel NotifyEnd Signed-off-by: Morgan Epp <60796713+epmog@users.noreply.github.com> --- test/openjd/sessions/test_runner_base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/openjd/sessions/test_runner_base.py b/test/openjd/sessions/test_runner_base.py index c0ff42c7..e1c6911e 100644 --- a/test/openjd/sessions/test_runner_base.py +++ b/test/openjd/sessions/test_runner_base.py @@ -862,8 +862,9 @@ def test_cancel_notify( assert len(notification_data) == 1 assert "NotifyEnd" in notification_data assert notification_data["NotifyEnd"][-1] == "Z" - time_end = datetime.fromisoformat(notification_data["NotifyEnd"][:-1]).astimezone( - timezone.utc + # Stripping the Z removes timezone information. Need to ensure it's not interpreted as local + time_end = datetime.fromisoformat(notification_data["NotifyEnd"][:-1]).replace( + tzinfo=timezone.utc ) # Timestamp should be around 2s from cancel signal, but give a 1s window # for timing differences.