Skip to content

Commit

Permalink
tz (ticdc): fix timezone error (#3887) (#3909)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Dec 20, 2021
1 parent 452ac26 commit b64f7f0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pkg/util/tz.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
package util

import (
"os"
"path/filepath"
"strings"
"time"

"github.com/pingcap/tidb/util/timeutil"
cerror "github.com/pingcap/tiflow/pkg/errors"
)

Expand Down Expand Up @@ -57,9 +57,6 @@ func GetLocalTimezone() (*time.Location, error) {
if time.Local.String() != "Local" {
return time.Local, nil
}
str, err := os.Readlink("/etc/localtime")
if err != nil {
return nil, cerror.WrapError(cerror.ErrLoadTimezone, err)
}
str := timeutil.InferSystemTZ()
return getTimezoneFromZonefile(str)
}

0 comments on commit b64f7f0

Please sign in to comment.