time bug fix
This commit is contained in:
parent
1880ee2b96
commit
5017cabec6
13
engine.go
13
engine.go
|
@ -1545,17 +1545,10 @@ func (engine *Engine) formatTime(sqlTypeName string, t time.Time) (v interface{}
|
|||
case core.Date:
|
||||
v = t.Format("2006-01-02")
|
||||
case core.DateTime, core.TimeStamp:
|
||||
<<<<<<< HEAD
|
||||
v = t.Format("2006-01-02 15:04:05")
|
||||
=======
|
||||
if engine.dialect.DBType() == "ql" {
|
||||
v = t
|
||||
} else if engine.dialect.DBType() == "sqlite3" {
|
||||
v = t.UTC().Format("2006-01-02 15:04:05")
|
||||
} else {
|
||||
v = t.Format("2006-01-02 15:04:05.999")
|
||||
v = t.Format("2006-01-02 15:04:05.999")
|
||||
if engine.dialect.DBType() == "sqlite3" {
|
||||
v = t.UTC().Format("2006-01-02 15:04:05.999")
|
||||
}
|
||||
>>>>>>> 8c9ffa956bec4149aa6f6961ab1afe93ff93b2eb
|
||||
case core.TimeStampz:
|
||||
if engine.dialect.DBType() == core.MSSQL {
|
||||
v = t.Format("2006-01-02T15:04:05.9999999Z07:00")
|
||||
|
|
Loading…
Reference in New Issue