mssql: Insert DateTime/Timestamp as UTC time string
This commit is contained in:
parent
f56113384f
commit
1f223168ee
|
@ -1470,6 +1470,8 @@ func (engine *Engine) formatTime(tz *time.Location, sqlTypeName string, t time.T
|
||||||
v = t
|
v = t
|
||||||
} else if engine.dialect.DBType() == "sqlite3" {
|
} else if engine.dialect.DBType() == "sqlite3" {
|
||||||
v = t.UTC().Format("2006-01-02 15:04:05")
|
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 {
|
} else {
|
||||||
v = t.Format("2006-01-02 15:04:05")
|
v = t.Format("2006-01-02 15:04:05")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue