From ca1ea9d90b069e81d96c356e9d8447c0ec3d01c7 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Wed, 3 Dec 2025 01:36:15 +0000 Subject: [PATCH] Always use timezone aware UTC time. --- passkey/fastapi/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/passkey/fastapi/api.py b/passkey/fastapi/api.py index d2d9a5b..d15cc50 100644 --- a/passkey/fastapi/api.py +++ b/passkey/fastapi/api.py @@ -84,7 +84,7 @@ async def validate_token( renewed = False if auth: current_expiry = session_expiry(ctx.session) - consumed = EXPIRES - (current_expiry - datetime.now()) + consumed = EXPIRES - (current_expiry - datetime.now(timezone.utc)) if not timedelta(0) < consumed < _REFRESH_INTERVAL: try: await refresh_session_token(