From 81c68db87fe8c4dc18a86caf198466d6fe29b0d3 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Thu, 30 Jul 2020 17:56:16 +0800 Subject: [PATCH] Fix zero time failed on mysql 8 --- tests/scanner_valuer_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/scanner_valuer_test.go b/tests/scanner_valuer_test.go index 2c2c1e18..63a7c63c 100644 --- a/tests/scanner_valuer_test.go +++ b/tests/scanner_valuer_test.go @@ -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 }