From b63631b46cd9b6b143a9d4a0f03e087b08d5123a Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Wed, 7 Jul 2021 09:12:46 -0700 Subject: Use time package-level variable PiperOrigin-RevId: 383426091 --- pkg/tcpip/link/sniffer/sniffer.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'pkg') diff --git a/pkg/tcpip/link/sniffer/sniffer.go b/pkg/tcpip/link/sniffer/sniffer.go index 2d6a3a833..530d737ba 100644 --- a/pkg/tcpip/link/sniffer/sniffer.go +++ b/pkg/tcpip/link/sniffer/sniffer.go @@ -87,11 +87,7 @@ func NewWithPrefix(lower stack.LinkEndpoint, logPrefix string) stack.LinkEndpoin } func zoneOffset() (int32, error) { - loc, err := time.LoadLocation("Local") - if err != nil { - return 0, err - } - date := time.Date(0, 0, 0, 0, 0, 0, 0, loc) + date := time.Date(0, 0, 0, 0, 0, 0, 0, time.Local) _, offset := date.Zone() return int32(offset), nil } -- cgit v1.2.3