Open Achilleshiel opened 9 hours ago
Related Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
CC @rsc via https://dev.golang.org/owners
You've identified the code. Do you want to send a patch? Thanks.
You've identified the code. Do you want to send a patch? Thanks.
Yes, I think I will be able to patch this. If not, I will let you know.
Found that it is also possible with time.LoadLocation()
and a time far enough in the future such that it is not in the explicit tz transitions. For example 2040: https://go.dev/play/p/h4ingW93eIU
Go version
go version go1.23.3 linux/amd64
Output of
go env
in your module/workspace:What did you do?
My goal was to check if a posix tz string has the same time zone transitions as a given
time.Location
. Via an empty Time zone information format string I loaded a Posix timezone string as location: https://go.dev/play/p/iRKJ1idPNz6. Using the loaded location I callZoneBounds()
.What did you see happen?
As from the go.dev/play example: it returns the end of DST and the end of the year.
What did you expect to see?
I expected to see get the end of DST and the start of the DST in the next year.
Debugging
I dug through the time library and found this comment:
This comment predates the addition of the
ZoneBounds
method. Which is now a second caller that cares.