Skip to content

Commit

Permalink
fix issue gogf#1714, gogf#1727
Browse files Browse the repository at this point in the history
  • Loading branch information
gqcn authored and houseme committed May 11, 2022
1 parent 489698d commit 7b2f449
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions database/gdb/gdb_func.go
Original file line number Diff line number Diff line change
Expand Up @@ -772,12 +772,6 @@ func handleArguments(sql string, args []interface{}) (newSql string, newArgs []i
newArgs = append(newArgs, arg)
continue

// Special handling for gtime.Time/*gtime.Time.
//
// DO NOT use its underlying gtime.Time.Time as its argument,
// because the std time.Time will be converted to certain timezone
// according to underlying driver. And the underlying driver also
// converts the time.Time to string automatically as the following does.
case gtime.Time:
newArgs = append(newArgs, arg.(gtime.Time).Time)
continue
Expand Down
2 changes: 1 addition & 1 deletion database/gdb/gdb_z_init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func init() {
Port: "3306",
User: TestDbUser,
Pass: TestDbPass,
Timezone: "Asia/Shanghai",
Timezone: "Asia/Shanghai", // For calculating UT cases of datetime zones in convenience.
Name: parser.GetOpt("name", "").String(),
Type: parser.GetOpt("type", "mysql").String(),
Role: "master",
Expand Down
2 changes: 1 addition & 1 deletion database/gdb/gdb_z_mysql_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func init() {
Port: "3306",
User: TestDbUser,
Pass: TestDbPass,
Timezone: "Asia/Shanghai",
Timezone: "Asia/Shanghai", // For calculating UT cases of datetime zones in convenience.
Name: parser.GetOpt("name", "").String(),
Type: parser.GetOpt("type", "mysql").String(),
Role: "master",
Expand Down

0 comments on commit 7b2f449

Please sign in to comment.