Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
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.