Commit 8158684d authored by Leon Tappe's avatar Leon Tappe 🔥
Browse files

add zoneinfo to date comparison

parent e025501b
......@@ -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())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment