Replace utcnow().timestamp() with time.time() in auth_store (#116879)

utcnow().timestamp() is a slower way to get time.time()
This commit is contained in:
J. Nick Koston 2024-05-05 15:25:27 -05:00 committed by GitHub
parent 6339c63176
commit 76cd498c44
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,6 +6,7 @@ from datetime import timedelta
import hmac
import itertools
from logging import getLogger
import time
from typing import Any
from homeassistant.core import HomeAssistant, callback
@ -290,7 +291,7 @@ class AuthStore:
perm_lookup = PermissionLookup(ent_reg, dev_reg)
self._perm_lookup = perm_lookup
now_ts = dt_util.utcnow().timestamp()
now_ts = time.time()
if data is None or not isinstance(data, dict):
self._set_defaults()