Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
time: time.LoadLocation returns incorrect time zone #34101
What version of Go are you using (
Thanks for reporting this. You are on 1.11, but I can reproduce the issue on go1.12 and on tip too, so it's not a recent regression.
It appears to be an issue in the parsing function. For example, the following:
note how the timezone info is completely wrong. But if I add the year to the time format, like this:
Then it works fine:
I was wrong, this is working as intended. Without a year, the default is the year 0000 and we can't really print meaningful timezone/zone offset info for that year. So Basically we print what the tzdata database has a the first recorded timezone and offset. This is a dup of #10297.
Closing, as this is not a bug.