Update engine.go
当数据库driver是https://github.com/denisenkom/go-mssqldb时,不对datetime类型进行时间截取,在go-mssqldb中会自动处理
This commit is contained in:
parent
fdb3b3c425
commit
6dd8bcfca0
|
@ -1383,6 +1383,8 @@ func (engine *Engine) FormatTime(sqlTypeName string, t time.Time) (v interface{}
|
|||
case core.TimeStampz:
|
||||
if engine.dialect.DBType() == core.MSSQL {
|
||||
v = engine.TZTime(t).Format("2006-01-02T15:04:05.9999999Z07:00")
|
||||
} else if engine.DriverName() == "mssql" {
|
||||
v = engine.TZTime(t)
|
||||
} else {
|
||||
v = engine.TZTime(t).Format(time.RFC3339Nano)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue