fix the insert multi and sqlite3 dis-match

This commit is contained in:
Lucas Liu 2014-12-02 13:27:00 +08:00
parent 5c23849a66
commit ad66c0ef35
1 changed files with 2 additions and 0 deletions

View File

@ -1419,6 +1419,8 @@ func (engine *Engine) FormatTime(sqlTypeName string, t time.Time) (v interface{}
case core.DateTime, core.TimeStamp: case core.DateTime, core.TimeStamp:
if engine.dialect.DBType() == "ql" { if engine.dialect.DBType() == "ql" {
v = engine.TZTime(t) v = engine.TZTime(t)
} else if engine.dialect.DBType() == "sqlite3" {
v = engine.TZTime(t).UTC().Format("2006-01-02 15:04:05")
} else { } else {
v = engine.TZTime(t).Format("2006-01-02 15:04:05") v = engine.TZTime(t).Format("2006-01-02 15:04:05")
} }