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: document how to render milli/micro/nano in time.Format #10963

Closed
AlexFinkel opened this issue May 26, 2015 · 0 comments

Comments

Projects
None yet
4 participants
@AlexFinkel
Copy link

commented May 26, 2015

The reference time described in the docstring for Format doesn't provide a value for nanoseconds. This hides the functionality provided by the Format function to render milli, micro and nanoseconds.

This has led to some confusion that Format can't handle sub-second precision: https://groups.google.com/forum/#!topic/golang-nuts/TIinEnPu5wE

One option for a solution might just be to add '.000000000' to the reference time in the doc comment.

@adg adg changed the title Document how to render milli/micro/nano in time.Format time: document how to render milli/micro/nano in time.Format May 26, 2015

@ianlancetaylor ianlancetaylor added this to the Go1.5Maybe milestone Jun 3, 2015

@robpike robpike closed this in 47f22ab Jul 15, 2015

@mikioh mikioh modified the milestones: Go1.5, Go1.5Maybe Jul 16, 2015

@golang golang locked and limited conversation to collaborators Jul 18, 2016

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