mirror of
https://github.com/home-assistant/core.git
synced 2026-08-24 10:13:52 -05:00
Use dt_util system_timezone in remote_calendar diagnostics (#177888)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user