-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
expression: fix ADD_DATE daylight saving time change (#20871) #20888
expression: fix ADD_DATE daylight saving time change (#20871) #20888
Conversation
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
/run-all-tests |
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.
@ichn-hu Please resolve conflicts.
expression/builtin_time.go
Outdated
func (du *baseDateArithmitical) addDate(ctx sessionctx.Context, date types.Time, year, month, day, nano int64) (types.Time, bool, error) { | ||
goTime, err := date.GoTime(time.UTC) |
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.
It seems that's not the correct change.
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.
Okay, I see, I'll fix them.
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
@qw4990 PTAL |
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
/run-all-tests |
cherry-pick #20871 to release-4.0
What problem does this PR solve?
Issue Number: close #19667
Problem Summary: golang's time api considers daylight saving time for time arithematics, but time in UTC won't be affected.
What is changed and how it works?
Proposal: xxx
What's Changed: change use of time.Locale to time.UTC.
Related changes
Check List
Tests
Side effects
N/A
Release note