-
Notifications
You must be signed in to change notification settings - Fork 18k
time: tzinfo for Thailand not present #26029
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
Comments
Thailand is currently using timezone called |
time.Now
gives me unexpected result in Thailand. time.Now()
gives me unexpected result in Thailand.
We just updated the vendored tzdata a couple of days ago. Is it possible for you to try with the master branch ? |
time.Now()
gives me unexpected result in Thailand.
This is working as intended. The name of the timezone is UTC+07:00. The invented three-letter abbreviations are being removed from the tzdata database in favour of the offset names (+07, in this case). We didn't decide this, it's the policy that has been adopted upstream. It started in the 2017a release.
The tzdata 2017a changelog says:
http://mm.icann.org/pipermail/tz-announce/2017-February/000045.html |
Ah, I did not notice this change. Under this case, maybe we may need change the behavior Below is a snippet to reproduce
It returns a error complaining |
Ah thanks for the clarification @ALTree. Also, please correct me if I am wrong - don't we need to re-run |
@agnivade Possibly? It looks like it's only needed for windows and I don't use it so I'm not sure... @alexbrainman committed all that contraption. Alex, can you help us? When should I just tried it and git diff shows several changes, so it appears that the |
gotcha. Closing this issue since such bug was already fixed. A lot thanks to @ALTree |
Guilty as charged.
You can run it any time. It uses current version of http://unicode.org/cldr/data/common/supplemental/windowsZones.xml and your $GOROOT/lib/time/zoneinfo.zip file. Alex |
@alexbrainman thanks! I sent a change: https://go-review.googlesource.com/c/go/+/120559 |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
In Thailand, I ran the following code:
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
2018-06-24 12:17:01.930111356 +0700 ICT m=+0.000337067
What did you see instead?
2018-06-24 12:17:01.930111356 +0700 +07 m=+0.000337067
The text was updated successfully, but these errors were encountered: