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: == on time.Time values compiles but doesn't work #8754
When we permitted == on structs in an earlier release of Go, we accidentally made time.Time values comparable this way. However, because time.Time values contain a *Location pointer, it's possible (and easy) to have two time.Times represent the same instant, even in the same time zone, yet compare unequal. This is a serious bug, as it enables subtle bugs if a time.Time is used as a key in a map or database. We need to find a way either to to break == statically or make it work dynamically. Too late for 1.4, as the issue is subtle. Marking for 1.5.