diff --git a/homeassistant/components/systemmonitor/coordinator.py b/homeassistant/components/systemmonitor/coordinator.py index f6b4dadc265..ed08d6ed151 100644 --- a/homeassistant/components/systemmonitor/coordinator.py +++ b/homeassistant/components/systemmonitor/coordinator.py @@ -221,7 +221,9 @@ class SystemMonitorCoordinator(TimestampDataUpdateCoordinator[SensorData]): if self._initial_update: # Boot time only needs to refresh on first pass - self.boot_time = dt_util.utc_from_timestamp(self._psutil.boot_time()) + self.boot_time = dt_util.utc_from_timestamp( + self._psutil.boot_time(), tz=dt_util.get_default_time_zone() + ) _LOGGER.debug("boot time: %s", self.boot_time) selected_processes: list[Process] = [] diff --git a/tests/components/systemmonitor/snapshots/test_diagnostics.ambr b/tests/components/systemmonitor/snapshots/test_diagnostics.ambr index 97d806614e1..74d8a797678 100644 --- a/tests/components/systemmonitor/snapshots/test_diagnostics.ambr +++ b/tests/components/systemmonitor/snapshots/test_diagnostics.ambr @@ -9,7 +9,7 @@ 'vethxyzxyz': "[snicaddr(family=, address='172.16.10.1', netmask='255.255.255.0', broadcast='255.255.255.255', ptp=None)]", }), 'battery': 'sbattery(percent=93, secsleft=16628, power_plugged=False)', - 'boot_time': '2024-02-24 15:00:00+00:00', + 'boot_time': '2024-02-24 07:00:00-08:00', 'cpu_percent': '10.0', 'disk_usage': dict({ '/': 'sdiskusage(total=536870912000, used=322122547200, free=214748364800, percent=60.0)', @@ -79,7 +79,7 @@ 'data': dict({ 'addresses': None, 'battery': 'sbattery(percent=93, secsleft=16628, power_plugged=False)', - 'boot_time': '2024-02-24 15:00:00+00:00', + 'boot_time': '2024-02-24 07:00:00-08:00', 'cpu_percent': '10.0', 'disk_usage': dict({ '/': 'sdiskusage(total=536870912000, used=322122547200, free=214748364800, percent=60.0)',