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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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"