This commit is contained in:
John Guo
2022-05-09 20:42:41 +08:00
parent e81d6a859b
commit 3db97ba0dd
3 changed files with 2 additions and 8 deletions

View File

@ -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

View File

@ -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",

View File

@ -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",