Skip to content

Commit 51bc5b4

Browse files
committed
Merge pull request #5 from siddontang/fix-time-test
fix CurrentTimestamp check error for different timezones
2 parents b7e5674 + 63ddb9c commit 51bc5b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

expression/expressions/helper_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package expressions
22

33
import (
44
"errors"
5+
"time"
56

67
. "github.com/pingcap/check"
78
"github.com/pingcap/tidb/expression"
@@ -160,7 +161,7 @@ func (s *testHelperSuite) TestGetTimeValue(c *C) {
160161
Ret interface{}
161162
}{
162163
{"2012-12-12 00:00:00", "2012-12-12 00:00:00"},
163-
{CurrentTimestamp, "1970-01-01 08:20:34"},
164+
{CurrentTimestamp, time.Unix(1234, 0).Format(mysql.TimeFormat)},
164165
{ZeroTimestamp, "0000-00-00 00:00:00"},
165166
{Value{"2012-12-12 00:00:00"}, "2012-12-12 00:00:00"},
166167
{Value{int64(0)}, "0000-00-00 00:00:00"},

0 commit comments

Comments
 (0)