Fix zero time failed on mysql 8

This commit is contained in:
Jinzhu 2020-07-30 17:56:16 +08:00
parent 07ce8caf7d
commit 81c68db87f
1 changed files with 1 additions and 1 deletions

View File

@ -258,5 +258,5 @@ func (t *EmptyTime) Scan(v interface{}) 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
}