Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time: large times do not roundtrip through Format/Parse #16639

zachjs opened this issue Aug 8, 2016 · 4 comments


None yet
5 participants
Copy link

commented Aug 8, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go version go1.6.3 darwin/amd64
  2. What operating system and processor architecture are you using (go env)?
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
  1. What did you do?
    I created a time.Time using a large Unix timestampt that corresponds to a date with a year >9999. I formatted the time and parsed the result.
    Playground demo:
  2. What did you expect to see?
    I expected Go to be able to parse the time it formatted using the same layout. Given that Format produced the timestamp, time.Parse should be able to parse it.
  3. What did you see instead?
    It returned an error.

This comment has been minimized.

Copy link

commented Aug 8, 2016

Doesn't seem worth caring about.

Do you actually care for some reason?

@bradfitz bradfitz added the Unfortunate label Aug 8, 2016

@quentinmit quentinmit added this to the Unplanned milestone Aug 8, 2016


This comment has been minimized.

Copy link

commented Aug 8, 2016

This issue came to my attention when one of the customers for the software I work on filed a ticket about it.

I agree that it’s pretty ridiculous, but the software I work on may be used in some ridiculous ways, and I don’t want to lose support because the programming language’s standard library supports only the minimum ISO standard rather than the maximum (including optional bits).


This comment has been minimized.

Copy link

commented Aug 8, 2016

Lose whose support? It sounds like they filed a ticket against you, so you are support, no? If your software needs to support years past 9999, you might have to write some specialized code instead of using the time package.

There are many things the time package doesn't do (like leap seconds: #15247, etc) or non-Gregorian calendars. It only aims to address the most common cases.


This comment has been minimized.

Copy link

commented Feb 4, 2017

Not going to worry about this.

@rsc rsc closed this Feb 4, 2017

@golang golang locked and limited conversation to collaborators Feb 4, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.