fix(orm/orm_raw): missing type time parse
This commit is contained in:
parent
a3be4cd7c7
commit
de27ad816f
@ -181,6 +181,12 @@ func (o *rawSet) setFieldValue(ind reflect.Value, value interface{}) {
|
||||
if err == nil {
|
||||
ind.Set(reflect.ValueOf(t))
|
||||
}
|
||||
} else if len(str) >= 8 {
|
||||
str = str[:8]
|
||||
t, err := time.ParseInLocation(formatTime, str, DefaultTimeLoc)
|
||||
if err == nil {
|
||||
ind.Set(reflect.ValueOf(t))
|
||||
}
|
||||
}
|
||||
}
|
||||
case sql.NullString, sql.NullInt64, sql.NullFloat64, sql.NullBool:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user