Use datetime.UTC alias [3.11] (#97067)

This commit is contained in:
Marc Mueller
2023-07-23 00:05:11 +02:00
committed by GitHub
parent da6802b009
commit fe0fe19be9
16 changed files with 38 additions and 80 deletions

View File

@ -736,7 +736,7 @@ async def test_timestamp(hass: HomeAssistant) -> None:
assert (
dt_util.as_local(
datetime.datetime.fromtimestamp(
state_without_tz.attributes[ATTR_TIMESTAMP], datetime.timezone.utc
state_without_tz.attributes[ATTR_TIMESTAMP], datetime.UTC
)
).strftime(FORMAT_DATETIME)
== "2020-12-13 10:00:00"