Skip to content
Snippets Groups Projects
Commit 8158684d authored by Leon Tappe's avatar Leon Tappe 🔥
Browse files

add zoneinfo to date comparison

parent e025501b
No related branches found
No related tags found
No related merge requests found
......@@ -199,7 +199,7 @@ def decrypt_ticket(ticket):
def check_ticket(decrypted):
# compare current time with request's datetime in utc
if (decrypted > datetime(2022, 3, 31, 23, 0, 0, 0) and datetime.now() < datetime(2022, 4, 3, 0, 0, 0, 0)):
if (decrypted > datetime(2022, 3, 31, 23, 0, 0, 0, tzinfo=tzutc()) and datetime.now(tzutc()) < datetime(2022, 4, 3, 0, 0, 0, 0, tzinfo=tzutc())):
return True
return decrypted > datetime.now(tzutc())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment