Open ChrisPortman opened 5 years ago
Change https://golang.org/cl/152117 mentions this issue: encoding/asn1: allow the user to specify the time format used to unmarshal
Wrong CL listed above; it should be https://go-review.googlesource.com/c/go/+/152117/
Meanwhile, there are questions about this idea, including whether it should happen at all. I have added the Proposal label to trigger a discussion about the role of this package vs. the crypto on.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Attempt to unmarshal generalized time received from a 3rd party system that used a format other than the one hard coded in the parseGeneralizedTime([]byte) (time.Time, error) function.
What did you expect to see?
A way to nominate the time format to be used
What did you see instead?
That the time format is hardcoded as a const within the time parsing funcs.