Skip to content

Commit

Permalink
tz (ticdc): fix timezone error (#3887) (#3910)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Dec 20, 2021
1 parent 62101ec commit 08e339d
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 08e339d

Please sign in to comment.