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: Incorrect Time.IsDST() result for "Europe/Dublin" when using embedded timezone info #56743
Comments
As far as I can tell from reading the tzdata files, Europe/Dublin uses standard time in the summer and reverse daylight savings time in the winter. So as best as I can tell the Go code is correctly representing the contents of the tzdata files.
If anybody has better information I'd be happy to learn. |
yes correct but, go time IsDST returns true on GMT isn't this incorrect? also |
The time package currently returns I don't know what is happening on MacOS. On Ubuntu I see the same results with the embedded tzdata and with the system tzdata which is 2022c. |
https://go.dev/play/p/YFQ7hgFMljU as I said it depends on which tzdata you run it on my Debian server with 2021a-1+deb11u7 it's incorrectly true and on MacOS is completely fine and return false as it should |
That program (https://go.dev/play/p/YFQ7hgFMljU) prints "true" on the playground, and it prints "true" on my Ubuntu system (tzdata 2022c), and it prints "true" on my Fedora system (tzdata 2022f). But it does print "false" on an old RHEL system. I bisected on tzdata versions, and it appears to print "false" up to tzdata 2018d and to print "true" from tzdata 2018e onward. The NEWS entry for 2018e says
So I really do think that Go is behaving correctly here. |
@ianlancetaylor I see, was confused with negative dst, didn't know they exist |
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
)?go env
OutputWhat did you do?
https://go.dev/play/p/YFQ7hgFMljU
then same code but without
export ZONEINFO=/usr/local/go/lib/time/zoneinfo.zip
What did you expect to see?
In both cases to receive DST: false (Dublin currently not in DST time zone)
What did you see instead?
if using embedded go time zone info data file IsDST function returns true instead of false
The text was updated successfully, but these errors were encountered: