From 08717cd95800efd4c8b05c7418dfc6c6e33d810b Mon Sep 17 00:00:00 2001 From: Mike Lawton Date: Fri, 27 Feb 2026 12:59:46 -0500 Subject: [PATCH] Fix day label off-by-one in parse_open_meteo_forecast --- src/plugins/weather/weather.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/weather/weather.py b/src/plugins/weather/weather.py index e5d829e83..cb60663ae 100644 --- a/src/plugins/weather/weather.py +++ b/src/plugins/weather/weather.py @@ -341,15 +341,16 @@ def parse_open_meteo_forecast(self, daily_data, units, tz, is_day, lat): forecast = [] for i in range(0, len(times)): - dt = datetime.fromisoformat(times[i]).replace(tzinfo=timezone.utc).astimezone(tz) - day_label = dt.strftime("%a") + local_date = date.fromisoformat(times[i]) + day_label = local_date.strftime("%a") + dt = datetime.combine(local_date, datetime.min.time()).replace(tzinfo=tz) code = weather_codes[i] if i < len(weather_codes) else 0 weather_icon = self.map_weather_code_to_icon(code, is_day=1) weather_icon_path = self.get_plugin_dir(f"icons/{weather_icon}.png") timestamp = int(dt.replace(hour=12, minute=0, second=0).timestamp()) - target_date: date = dt.date() + timedelta(days=1) + target_date = local_date try: phase_age = moon.phase(target_date)