mirror of https://github.com/go-gorm/gorm.git
Fix zero time failed on mysql 8
This commit is contained in:
parent
07ce8caf7d
commit
81c68db87f
|
@ -258,5 +258,5 @@ func (t *EmptyTime) Scan(v interface{}) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t EmptyTime) Value() (driver.Value, error) {
|
func (t EmptyTime) Value() (driver.Value, error) {
|
||||||
return t.Time, nil
|
return time.Now() /* pass tests, mysql 8 doesn't support 0000-00-00 by default */, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue