-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.
Milestone
Description
What version of Go are you using (go version)?
$ go version go version go1.16.3 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/root/.cache/go-build" GOENV="/root/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.16.3" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/dev/null" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2227163467=/tmp/go-build -gno-record-gcc-switches"
What did you do?
When I run the following test program in Go 1.16.3 Docker image:
docker run --rm -it golang:1.16.3 /bin/bash
root@7f026683314e:/go# cat >/main.go
package main
import (
"fmt"
"time"
)
func main() {
loc, err := time.LoadLocation("Europe/Dublin")
if err != nil {
panic(err)
}
t, err := time.ParseInLocation("2006-01-02T15:04:05", "2021-04-02T11:12:13", loc)
if err != nil {
panic(err)
}
fmt.Println(t)
}
root@7f026683314e:/go# go run /main.go
2021-04-02 11:12:13 +0100 IST
root@7f026683314e:/go# ZONEINFO=/usr/local/go/lib/time/zoneinfo.zip go run /main.go
2021-04-02 11:12:13 +0034 IST
What did you expect to see?
I expect to see 2021-04-02 11:12:13 +0100 IST also when using the embedded timezone database.
What did you see instead?
2021-04-02 11:12:13 +0034 IST which has incorrect offset from UTC.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.