summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@google.com>2021-07-07 09:12:46 -0700
committergVisor bot <gvisor-bot@google.com>2021-07-07 09:15:41 -0700
commitb63631b46cd9b6b143a9d4a0f03e087b08d5123a (patch)
tree801b1819c74f1dde826dccf30947d2073a276845
parentadd8bca5ba53b37096bc653900cb278e11681461 (diff)
Use time package-level variable
PiperOrigin-RevId: 383426091
-rw-r--r--pkg/tcpip/link/sniffer/sniffer.go6
1 files changed, 1 insertions, 5 deletions
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
}