-
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
add buildin function UTC_TIME #3145
Conversation
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 also update plan/typeinferer.go.
expression/builtin_time_test.go
Outdated
defer testleak.AfterTest(c)() | ||
tfStr := "15:04:05" | ||
|
||
last := time.Now().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 is better to use a table to drive the test.
expression/builtin_time.go
Outdated
return d, errors.Trace(err) | ||
} | ||
} | ||
d.SetString(time.Now().UTC().Format("15:04:05.000000")) |
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.
Make "15:04:05.000000" a const.
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
Implemented UTC_TIME see here: #236