Use time package-level variable

PiperOrigin-RevId: 383426091
This commit is contained in:
Tamir Duberstein
2021-07-07 09:15:41 -07:00
committed by gVisor bot
parent add8bca5ba
commit b63631b46c
+1 -5
View File
@@ -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
}