Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
time: parseTimeZone() doesn't work for for many Zones formatted by Time.Format() #24071
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
The timezone handling by the time package is entirely dependent on the files supplied by your operating system. As you have shown, due to changes in the way that Turkey handles time zones, the files on your system print some dates in the Europe/Istanbul timezone using
It is not a goal that
Closing because there is nothing we can do.
Actually that is not completely true, as it can be matched on the system and the error is generated before trying to match it.
time.Parse calls time.ParseTimeZone() which then rejects this as it does not fit into the scheme having at least three upper case letters and a T in the end, see:
adding a third special case like:
and packing my example into a test in that package shows that this is easily solvable.
I am also willing to fix that using a bit more sophisticated special case then shown above, if this bug gets accepted.