-
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
types: fix incorrect weekday
for ALLOW_INVALID_DATES
mode
#10864
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10864 +/- ##
===========================================
Coverage 81.2957% 81.2957%
===========================================
Files 423 423
Lines 90124 90124
===========================================
Hits 73267 73267
Misses 11557 11557
Partials 5300 5300 |
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.
Please add some test.
if err != nil { | ||
return 0 | ||
return t1.Weekday() |
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.
return t1.Weekday() | |
t1, _ := t.GoTime(gotime.Local) | |
return t1.Weekday() |
I think this is better.
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.
we can't ignore err check
weekday
weekday
for ALLOW_INVALID_DATES
mode
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 |
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
@b41sh We may need to cherry pick this one to release branches including release-3.1. |
It seems that, not for sure, we failed to cherry-pick this commit to release-2.1 release-3.0. Please comment '/run-cherry-picker' to try to trigger the cherry-picker if we did fail to cherry-pick this commit before. @imtbkcat PTAL. |
/run-cherry-picker |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-2.1 in PR #16169 |
cherry pick to release-3.0 in PR #16170 |
cherry pick to release-3.1 in PR #16171 |
What problem does this PR solve?
Fix the problem invalid
weekday
function#10835
What is changed and how it works?
ignore GoTime error
Check List
Tests