mssql: Insert DateTime/Timestamp as UTC time string

This commit is contained in:
Linquize 2016-02-06 17:28:22 +08:00
parent f56113384f
commit 1f223168ee
1 changed files with 2 additions and 0 deletions

View File

@ -1470,6 +1470,8 @@ func (engine *Engine) formatTime(tz *time.Location, sqlTypeName string, t time.T
v = t
} else if engine.dialect.DBType() == "sqlite3" {
v = t.UTC().Format("2006-01-02 15:04:05")
} else if engine.dialect.DBType() == core.MSSQL {
v = engine.TZTime(t).UTC().Format("2006-01-02 15:04:05")
} else {
v = t.Format("2006-01-02 15:04:05")
}