From d12fbf081b58ee5f7fc7b21afbb676837d0b4e00 Mon Sep 17 00:00:00 2001 From: Thomas55555 <59625598+Thomas55555@users.noreply.github.com> Date: Sun, 16 Aug 2026 22:42:58 +0200 Subject: [PATCH] Use dt_util system_timezone in remote_calendar diagnostics (#177888) --- homeassistant/components/remote_calendar/diagnostics.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/remote_calendar/diagnostics.py b/homeassistant/components/remote_calendar/diagnostics.py index a8d8044f3472..d872235648dc 100644 --- a/homeassistant/components/remote_calendar/diagnostics.py +++ b/homeassistant/components/remote_calendar/diagnostics.py @@ -1,6 +1,5 @@ """Provides diagnostics for the remote calendar.""" -import datetime from typing import Any from ical.diagnostics import redact_ics @@ -19,7 +18,7 @@ async def async_get_config_entry_diagnostics( payload: dict[str, Any] = { "now": dt_util.now().isoformat(), "timezone": str(dt_util.get_default_time_zone()), - "system_timezone": str(datetime.datetime.now().astimezone().tzinfo), # pylint: disable=home-assistant-enforce-naive-now + "system_timezone": str(dt_util.naive_now().astimezone().tzinfo), } payload["ics"] = "\n".join(redact_ics(coordinator.ics)) return payload