mirror of
https://github.com/home-assistant/core.git
synced 2026-11-06 13:41:27 -04:00
Fix date-only input_datetime timestamp attribute to use the correct TZ (#174357)
This commit is contained in:
@@ -344,7 +344,9 @@ async def test_set_datetime_date(hass: HomeAssistant) -> None:
|
||||
assert not state.attributes["has_time"]
|
||||
assert state.attributes["has_date"]
|
||||
|
||||
date_dt_obj = datetime.datetime(2017, 9, 7)
|
||||
date_dt_obj = datetime.datetime(
|
||||
2017, 9, 7, tzinfo=dt_util.get_time_zone(hass.config.time_zone)
|
||||
)
|
||||
assert state.attributes["timestamp"] == date_dt_obj.timestamp()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user