From a293df05f7cca03661773aac64864567ec3d48fb Mon Sep 17 00:00:00 2001 From: Salvatore Laiso <32564922+salvatorelaiso@users.noreply.github.com> Date: Wed, 26 Jul 2023 15:42:56 +0200 Subject: [PATCH] Timezone aware --- pyeudiw/tools/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyeudiw/tools/utils.py b/pyeudiw/tools/utils.py index 2d6c004f..86ff84dc 100644 --- a/pyeudiw/tools/utils.py +++ b/pyeudiw/tools/utils.py @@ -15,11 +15,11 @@ def make_timezone_aware(dt: datetime.datetime): def iat_now() -> int: - return int(datetime.datetime.now().timestamp()) + return int(datetime.datetime.now().timestamp(datetime.timezone.utc)) def exp_from_now(minutes: int = 33) -> int: - now = datetime.datetime.now() + now = datetime.datetime.now(datetime.timezone.utc) return int((now + datetime.timedelta(minutes=minutes)).timestamp())