Skip to content
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

evaluator, parser: support UTC_DATE() #1045

Merged
merged 2 commits into from
Apr 5, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Address comments.
  • Loading branch information
overvenus committed Apr 5, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit ec8ed07f3bcf6d0e07e95bec4d73ab78f70929ff
2 changes: 1 addition & 1 deletion evaluator/builtin_time.go
Original file line number Diff line number Diff line change
@@ -392,7 +392,7 @@ func builtinCurrentTime(args []types.Datum, _ context.Context) (d types.Datum, e

// See https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_utc-date
func builtinUTCDate(args []types.Datum, _ context.Context) (d types.Datum, err error) {
year, month, day := time.Now().Date()
year, month, day := time.Now().UTC().Date()
t := mysql.Time{
Time: time.Date(year, month, day, 0, 0, 0, 0, time.UTC),
Type: mysql.TypeDate, Fsp: mysql.UnspecifiedFsp}