Skip to content

proposal: time: use big-endian/ISO reference time #25572

Closed as not planned
Closed as not planned
@akavel

Description

@akavel

(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.)

Proposal

I propose that for Go2, the "reference time" used by time.Format and time.Parse is changed to:

2001-02-03 16:05:06-0700

alias Feb 3 16:05:06 -0700 2001.

Rationale

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:

The choice was made by the output of the date command on my Unix
machine. I should have realized the format varies with locale. Mea
culpa. [...]

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".

Alternatives

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Proposalv2An incompatible library change

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions