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

fix: convert refreshed_at to UTC before updating #1916

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

kangmingtay
Copy link
Member

@kangmingtay kangmingtay commented Jan 16, 2025

What kind of change does this PR introduce?

  • Fixes an issue with session inactivity timeout where the session's refreshed_at time is being saved without the timezone since the underlying postgres type uses timestamp without time zone. This means that when the timestamp is later queried from the database, go assumes that the timestamp is in UTC (since there's no timezone information stored).
  • Decided not to add a migration to update the database type since this could be an expensive operation for users with large auth.sessions tables.

@kangmingtay kangmingtay requested a review from a team as a code owner January 16, 2025 02:22
@coveralls
Copy link

Pull Request Test Coverage Report for Build 12800829185

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 65.445%

Totals Coverage Status
Change from base Build 12786188298: 0.01%
Covered Lines: 9818
Relevant Lines: 15002

💛 - Coveralls

@kangmingtay kangmingtay enabled auto-merge (squash) January 16, 2025 07:30
@kangmingtay kangmingtay merged commit a4c692f into master Jan 16, 2025
5 checks passed
@kangmingtay kangmingtay deleted the km/inactivity-session-bug branch January 16, 2025 09:46
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 this pull request may close these issues.

3 participants