-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
executor, expression: calculating the default value for datetime should consider the time zone #7655
Conversation
…ld consider the time zone
@XuHuaiyu @tiancaiamao @eurekaka @lysu PTAL. |
/run-common-test tidb-test=pr/620 |
@coocood Why? |
@zz-jason never mind CI failed, due to |
I think what @coocood mean is that: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Got it. After investigating, mysql document says:
And the behavior seems like MySQL converts DATETIME values from the current time zone to UTC for storage, but for retrieval, MySQL doesn't convert back from UTC to the current time zone. |
/run-all-tests tidb-test=pr/620 |
…ld consider the time zone (pingcap#7655)
What problem does this PR solve?
The default value calculated for datetime column has not consider the timezone. This PR fixes it.
What is changed and how it works?
Check List
Tests
Related changes