diff --git a/src/python_testing/TC_EEVSE_2_3.py b/src/python_testing/TC_EEVSE_2_3.py index eb4e43d0b50105..54c5baa1a7ddff 100644 --- a/src/python_testing/TC_EEVSE_2_3.py +++ b/src/python_testing/TC_EEVSE_2_3.py @@ -194,8 +194,10 @@ def compute_expected_target_time_as_epoch_s(self, minutes_past_midnight): f"{int(minutes_past_midnight/60)}:{int(minutes_past_midnight%60)}" f" Expected target_time = {target_time}") - target_time_delta = target_time - \ - datetime(2000, 1, 1, 0, 0, 0, 0).astimezone(timezone.utc) + matter_base_time = datetime(2000, 1, 1, 0, 0, 0, 0, tzinfo=timezone.utc) + + target_time_delta = target_time - matter_base_time + expected_target_time_epoch_s = int(target_time_delta.total_seconds()) return expected_target_time_epoch_s