Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zhexuany committed Sep 14, 2018
1 parent 74d394a commit 64a5b2e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion executor/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2367,7 +2367,7 @@ func (s *testSuite) TestTimezonePushDown(c *C) {
defer tk.MustExec("drop table t")
tk.MustExec(`insert into t values ("2018-09-13 10:02:06")`)

systemTZ := timeutil.Local()
systemTZ := timeutil.SystemLocation()
c.Assert(systemTZ.String(), Not(Equals), "System")
ctx := context.Background()
count := 0
Expand Down
2 changes: 1 addition & 1 deletion expression/builtin_time_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ func (s *testEvaluatorSuite) TestSysDate(c *C) {
fc := funcs[ast.Sysdate]

ctx := mock.NewContext()
ctx.GetSessionVars().StmtCtx.TimeZone = timeutil.Local()
ctx.GetSessionVars().StmtCtx.TimeZone = timeutil.SystemLocation()
timezones := []types.Datum{types.NewDatum(1234), types.NewDatum(0)}
for _, timezone := range timezones {
// sysdate() result is not affected by "timestamp" session variable.
Expand Down
2 changes: 1 addition & 1 deletion sessionctx/variable/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ func (s *SessionVars) GetNextPreparedStmtID() uint32 {
func (s *SessionVars) Location() *time.Location {
loc := s.TimeZone
if loc == nil {
loc = timeutil.Local()
loc = timeutil.SystemLocation()
}
return loc
}
Expand Down
2 changes: 1 addition & 1 deletion sessionctx/variable/varsutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ func tidbOptInt64(opt string, defaultVal int64) int64 {

func parseTimeZone(s string) (*time.Location, error) {
if strings.EqualFold(s, "SYSTEM") {
return timeutil.Local(), nil
return timeutil.SystemLocation(), nil
}

loc, err := time.LoadLocation(s)
Expand Down

0 comments on commit 64a5b2e

Please sign in to comment.