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: extraneous information in Parse error message for interior element missing leading zero #29912

Open
tredoe opened this issue Jan 24, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@tredoe
Copy link

commented Jan 24, 2019

What version of Go are you using (go version)?

$ go version
go version go1.11.4 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What did you do?

Parsing the time "03:4:05" with layout "15:04:05".

What did you expect to see?

At the last part of the error: cannot parse "4" as "04"

What did you see instead?

cannot parse "4:05" as "04"

@tredoe

This comment has been minimized.

Copy link
Author

commented Jan 24, 2019

@bcmills

This comment has been minimized.

Copy link
Member

commented Jan 29, 2019

CC @rsc

For this one the error message is at least technically correct: it's true that you can't parse the string 4:05 as the 04 component.

@bcmills bcmills added this to the Go1.13 milestone Jan 29, 2019

@bcmills bcmills changed the title time: wrong error message at parsing minutes time: extraneous information in Parse error message for interior element missing leading zero Jan 29, 2019

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