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: go 1.5 time.Format layout "5" handled as "05" #12440

Closed
foubarre opened this issue Sep 1, 2015 · 13 comments

Comments

Projects
None yet
4 participants
@foubarre
Copy link

commented Sep 1, 2015

go version go1.5 linux/amd64
c.f. http://play.golang.org/p/hgH-YaTDjR
formatting seconds using "5" layout prefix single digit values with "0" as if layout "05" was used

@gopherbot

This comment has been minimized.

Copy link

commented Sep 2, 2015

CL https://golang.org/cl/14171 mentions this issue.

@gopherbot

This comment has been minimized.

Copy link

commented Sep 2, 2015

CL https://golang.org/cl/14178 mentions this issue.

@stemar94

This comment has been minimized.

Copy link

commented Sep 2, 2015

I abandoned cl/14171, and now cl/14178 is the one waiting to get through the code-review.

@foubarre

This comment has been minimized.

Copy link
Author

commented Sep 8, 2015

thanks!
do you know which go release it will go into?

@stemar94

This comment has been minimized.

Copy link

commented Sep 8, 2015

@robpike robpike closed this in c12e38a Sep 9, 2015

@stemar94

This comment has been minimized.

Copy link

commented Sep 9, 2015

@foubarre
It is fixed and merged, but I do not know in which release it will occur. Probably 1.6

@foubarre

This comment has been minimized.

Copy link
Author

commented Sep 9, 2015

This bug is a regression compared to 1.4, if it doesn't make it to 1.5.x we'll need to either:

  • wait for 1.6
  • introduce the same regression in our product
  • do convoluted workarounds instead of using vanilla time.Format
@stemar94

This comment has been minimized.

Copy link

commented Sep 9, 2015

Bug comes with
d5ef698
so it is indeed introduced with go1.5.
@robpike , @griesemer This issue needs a labeling, 1.5.2 could apply for a newly introduced bug?

@foubarre We just missed 1.5.1 and 1.5.2 would be for 31.Oct. So if you don't have the possibility to checkout go1.5.1 and fetch this single fix you have try a workaround.

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Sep 9, 2015

Our goal for point releases is to only patch critical bugs for which there is no workaround. Unfortunately I don't think this issue rises to that level.

@stemar94

This comment has been minimized.

Copy link

commented Sep 9, 2015

@ianlancetaylor
How does it normally work, if no label is set? Will these fixes be automatically added for the next 1.X release?

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Sep 9, 2015

Yes, anything committed to the tree now will be in the 1.6 release.

@foubarre

This comment has been minimized.

Copy link
Author

commented Sep 10, 2015

Working on commercial software we are contractually bound to fix regressions, however mundane they might seem.
Only workaround I can think of is to copy my own version of time/format.go including the fix.
Concern with waiting on a major release to get minor regressions fixed is to run into other newly introduced regressions... (though I understand golang project has its own concerns & constraints which may not include catering to all my specific needs ;-))

@stemar94

This comment has been minimized.

Copy link

commented Sep 10, 2015

https://gist.github.com/21ebfbf673ea783b9205
Thats all you need to change.

Update github gave me a wrong link.
Update2 just had to delete the .git at the end...

@golang golang locked and limited conversation to collaborators Sep 22, 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.