New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
time/tzdata: zoneinfo error for America/Tijuana #56913
Comments
I'm sorry, i can't recreate the problem. I'm running this program: package main
import (
"fmt"
"log"
"time"
)
func main() {
loc, err := time.LoadLocation("America/Tijuana")
if err != nil {
log.Fatal(err)
}
d := time.Date(2022, 11, 22, 10, 0, 0, 0, loc)
fmt.Println(d)
} It always prints Can you show complete and precise instructions for how to see the problem? Thanks. |
You should test like this: When you trans a timestamp to string-style-time, it will has 1 hour diff with local real time |
Or you can test the code: loc, _:= time.LoadLocation("America/Tijuana") |
I don't see the same thing you're seeing. The program:
Prints
On both go1.18.8, go1.19.3, and tip (on darwin/amd64). |
Please give us complete and precise instructions for how to see the problem. Tell us every single step. Be complete and precise. Thanks. |
step 1. run update.bash update zoneinfo.zip to 2022f step 2. run test code import ( func main() { step 3. check result |
Hmmm, are you really using Go 1.13? The fix for the problem you are describing was first released as part of the Go 1.14 release series (https://go.dev/cl/215539). Go 1.13 is no longer supported. The most recent release is Go 1.19. Can you recreate the problem using Go 1.19? |
I see, go 1.19 do not has this bug. If using go 1.13, -R option can solve this problem Thanks all you guys, this issue can closed. |
What did you do?
I found that the zoneinfo.zip data in latest golang versions is error (such go 1.18, go 1.19)
Because from tzdata 2022b, the zoneinfo generator zic has changed, and -R parameter is add.
-R parameter is using to generate redundant data until to 2038
How to reproduce the problem
How to fix:
tzdata 2022f is released and the golang /lib/time/zoneinfo.zip need to be updated.
the update.bash script has some error, -R args is need for building zoneinfo data.
The text was updated successfully, but these errors were encountered: