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
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@tredoe
Copy link

tredoe 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
Copy link
Author

tredoe commented Jan 24, 2019

@bcmills
Copy link
Contributor

bcmills 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 the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 29, 2019
@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
@andybons andybons modified the milestones: Go1.13, Go1.14 Jul 8, 2019
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants