improve debug infor for argument of time.Time for package gdb

This commit is contained in:
John
2020-11-26 19:53:44 +08:00
parent 1d807c095a
commit 750b53d7aa

View File

@ -716,7 +716,7 @@ func FormatSqlWithArgs(sql string, args []interface{}) string {
return `'` + gstr.QuoteMeta(gconv.String(args[index]), `'`) + `'`
case reflect.Struct:
if t, ok := args[index].(time.Time); ok {
return `'` + gtime.NewFromTime(t).String() + `'`
return `'` + t.Format(`2006-01-02 15:04:05`) + `'`
}
return `'` + gstr.QuoteMeta(gconv.String(args[index]), `'`) + `'`
}