Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
proposal: time: use big-endian/ISO reference time #25572
(I couldn't find an existing issue mentioning this, so I wanted to submit it for consideration for Go2, to make sure that whatever the final decision, it's at least given proper thought and not overlooked purely by accident.)
I propose that for Go2, the "reference time" used by time.Format and time.Parse is changed to:
alias Feb 3 16:05:06 -0700 2001.
This has the advantage of being trivial to remember for the whole world, not only U.S. residents, as well as being generally simpler in idea, following the "network order" (a.k.a. big endian), and straightforwardly corresponding to the universally (?) known international standards of RFC 3339 / ISO 8601.
The old reference time AFAIU is more or less accidental, per Rob's 2014 comment:
I believe Go2 is a point where this can potentially be approached, disarming somewhat the (AFAIU) main (and only?) rejection argument of "it's too late, this ship has sailed".
One option for variables: maybe there could be an extra package (possibly not in stdlib), which would convert Go1 format to Go2 at runtime. Nontrivial usages could be automatically rewritten to use the conversion function (e.g.
In #20757 (comment) I suggested a