Incorrect behaviour of time.Date function #47549
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
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://play.golang.org/p/hyyLG_o8ERS
What did you expect to see?
The two time instances should be equal.
What did you see instead?
The two time instances are not equal.
This is happening because
(t *Time) setLoc
has this if statementInstead of checking for the equality of pointers, we should check for the equality of the Location structs that they point to.
So, I propose changing it to
The text was updated successfully, but these errors were encountered: