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: Parse(..) should use year 1 when no year is given to match the time.Time zero value #29840
What version of Go are you using (
As far as I can tell, the only reason to do this would be so that you can compute offsets from a zero time value. I suggest that you simply don't do that. If you want to compare the result of
The current behavior is documented and has been documented since Go 1.1, so we would need a really really good reason to change it now.
Definitely it's a minor thing. It just seemed like an inconsistency between the
I thought maybe a small fix change like this could happen as a part of Go 2. I understand though that it's still not easy to change the standard library behavior.
Thanks for the reply!