bug: Modify MySQL connection URL to use system timezone#134
Merged
debba merged 1 commit intodebba:mainfrom Apr 15, 2026
Merged
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Analysis: The PR reapplies the timezone fix after the codebase refactoring. The original fix (adding Change verified:
This correctly instructs the sqlx MySQL driver to use the server's configured system timezone instead of forcing UTC, which addresses the original bug described in the PR. Reviewed by kimi-k2.5-0127 · 569,408 tokens |
17fae8b to
b46305d
Compare
Contributor
Author
|
I updated my PR to fix a conflict after the main branch changed. |
Owner
|
That's great, thanks a lot for this, and sorry I was working on code refactoring in builtin drivers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In pool_manager.rs:43, the MySQL connection URL has no timezone parameter. The sqlx MySQL driver defaults to setting time_zone='UTC' on every connection, so NOW() always returns UTC regardless of the server or user's local timezone.
The fix is to add timezone=SYSTEM to the connection URL, which tells MySQL to use the server's configured system timezone instead of being forced to UTC.