-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Description
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.11.1 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ef/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ef/code/go/"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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-build929309457=/tmp/go-build -gno-record-gcc-switches"
What did you do?
Build and run the following snippet both in linux/amd64(local architecture) and wasm/js
package main
import (
"fmt"
"time"
)
func main() {
fmt.Println(time.Now().Location())
}What did you expect to see?
The results should be consisitent with the following javascript code, which should return the OS timezone info:
console.log(Intl.DateTimeFormat().resolvedOptions().timeZone)What did you see instead?
On native architecture(linux/amd64):
Asia/ShanghaiOn browser javascript:
Asia/ShanghaiOn wasm:
UTC