Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/test_session.py::test_token_cookie_expires failed #554

Open
mavwolverine opened this issue Dec 31, 2024 · 0 comments · Fixed by #557
Open

tests/test_session.py::test_token_cookie_expires failed #554

mavwolverine opened this issue Dec 31, 2024 · 0 comments · Fixed by #557
Assignees

Comments

@mavwolverine
Copy link

For me, this test fails with AssertionError.

assert (datetime.datetime(2025, 4, 10, 8, 34, 32) - datetime.timedelta(days=100)) < datetime.datetime(2024, 12, 31, 7, 34, 32, 462970)

If you print the values:

>>> (datetime.datetime(2025, 4, 10, 8, 34, 32) - datetime.timedelta(days=100)) , datetime.datetime(2024, 12, 31, 7, 34, 32, 462970)
(datetime.datetime(2024, 12, 31, 8, 34, 32), datetime.datetime(2024, 12, 31, 7, 34, 32, 462970))

The c.expires is 1 hour ahead of the check (8 vs 7).

Is this something to do with DST?

mavwolverine added a commit to mavwolverine/supertokens-python that referenced this issue Jan 1, 2025
mavwolverine added a commit to mavwolverine/supertokens-python that referenced this issue Jan 1, 2025
namsnath added a commit to namsnath/supertokens-python that referenced this issue Feb 5, 2025
- Makes timestamps consistent, uses UTC timezone

Ref: supertokens#554
namsnath added a commit to namsnath/supertokens-python that referenced this issue Feb 7, 2025
- Makes timestamps consistent, uses UTC timezone

Ref: supertokens#554
mavwolverine added a commit to mavwolverine/supertokens-python that referenced this issue Feb 7, 2025
namsnath added a commit to namsnath/supertokens-python that referenced this issue Feb 9, 2025
- Makes timestamps consistent, uses UTC timezone

Ref: supertokens#554

Co-authored-by: Viraj Kanwade <viraj.kanwade@forgeahead.io>
@namsnath namsnath linked a pull request Feb 10, 2025 that will close this issue
10 tasks
@namsnath namsnath self-assigned this Feb 10, 2025
sattvikc pushed a commit that referenced this issue Feb 11, 2025
- Makes timestamps consistent, uses UTC timezone

Ref: #554

Co-authored-by: Viraj Kanwade <viraj.kanwade@forgeahead.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants