You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: https://play.golang.org/p/QSE-o48r5c
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.
What did you see instead?
It returned an error.
The text was updated successfully, but these errors were encountered:
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).
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.
Please answer these questions before submitting your issue. Thanks!
go version
)?go version go1.6.3 darwin/amd64
go env
)?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: https://play.golang.org/p/QSE-o48r5c
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.It returned an error.
The text was updated successfully, but these errors were encountered: