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: Panic with time.Parse(time.StampNano, [time in time.StampMicro format]) #4502

gopherbot opened this issue Dec 7, 2012 · 4 comments


Copy link

@gopherbot gopherbot commented Dec 7, 2012

by okeeffeco:

What steps will reproduce the problem?

What is the expected output?

error, as in the play sample

What do you see instead?

panic: runtime error: slice bounds out of range

goroutine 1 [running]:
time.parseNanoseconds(0x4b2baf, 0x7, 0xa, 0x0, 0x0, ...)
    /home/jake/code/golang/src/pkg/time/format.go:937 +0x14c
time.Parse(0x4b5e19, 0x0, 0x4b2baf, 0x7, 0x46e820, ...)
    /home/jake/code/golang/src/pkg/time/format.go:858 +0x199c
    /tmp/t.go:14 +0x51

goroutine 2 [syscall]:
created by runtime.main
exit status 2

Which compiler are you using (5g, 6g, 8g, gccgo)?


Which operating system are you using?

Debian Linux

Which version are you using?

Tested with:

go version devel +a5efcd1675eb Thu Dec 06 09:47:12 2012 -0800
go version devel +88e4ba173900 Wed Nov 28 17:01:59 2012 +1100

Please provide any additional information below.

Realize I'm parsing one format with another, but this is part of an underlying tool
where I don't always know what format is sent in.

Works on release (1.0.3)
Copy link

@rsc rsc commented Dec 10, 2012

Comment 1:

Labels changed: added size-m.

Copy link

@rsc rsc commented Dec 10, 2012

Comment 2:

Labels changed: added suggested.

Copy link

@davecheney davecheney commented Dec 15, 2012

Comment 3:

Owner changed to @davecheney.

Status changed to Started.

Copy link

@davecheney davecheney commented Dec 17, 2012

Comment 4:

This issue was closed by revision 2d3bdab.

Status changed to Fixed.

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.