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: Formatted output missing leading zero in year #2024

Closed
gjemiller opened this issue Jun 29, 2011 · 2 comments
Closed

time: Formatted output missing leading zero in year #2024

gjemiller opened this issue Jun 29, 2011 · 2 comments
Assignees

Comments

@gjemiller
Copy link

@gjemiller gjemiller commented Jun 29, 2011

Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull", "hg update default", rebuild, and
retry
what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
Compile and run this program:

package main

import "time"

func main() {
    t := time.Time{Year:2001, Month:2, Day:3}
    println(t.Format("06 01 02"))
}


What is the expected output?
01 02 03

What do you see instead?
1 02 03

Which compiler are you using (5g, 6g, 8g, gccgo)?
Goplay on golang.org ( http://goo.gl/VwZh1 )
@adg
Copy link
Contributor

@adg adg commented Jun 30, 2011

Comment 1:

Labels changed: added packagebug.

Owner changed to @robpike.

Status changed to Accepted.

@robpike
Copy link
Contributor

@robpike robpike commented Jun 30, 2011

Comment 2:

This issue was closed by revision de36d19.

Status changed to Fixed.

@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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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