From 6ef49e8a53efd2eb4fccaeb564b655671d60fc97 Mon Sep 17 00:00:00 2001 From: Guy Khmelnitsky <3136012+GuyKh@users.noreply.github.com> Date: Mon, 4 Nov 2024 08:28:02 +0200 Subject: [PATCH] fix: Fix DST again --- ims_envista/meteo_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ims_envista/meteo_data.py b/ims_envista/meteo_data.py index 340944a..0fc269d 100644 --- a/ims_envista/meteo_data.py +++ b/ims_envista/meteo_data.py @@ -166,7 +166,7 @@ def _fix_datetime_offset(dt: datetime.datetime) -> tuple[datetime.datetime, bool # Replace the pytz tzinfo with the fixed timezone dt = dt.replace(tzinfo=fixed_timezone) - is_dst = dt.dst() != datetime.timedelta(0) + is_dst = dt.dst() and dt.dst() != datetime.timedelta(0) if is_dst: dt = dt + datetime.timedelta(hours=1)