Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
time: Format() ignores _ on go tip #23259
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
That change (https://golang.org/cl/78735) changes the string
Since the use of
I know breaking someone's existing code is not good, I just wanted to make consistent API as I said in #22802. Since the result of this code(https://play.golang.org/p/3fAVlR36KIf) also seems not proper for you(on go 1.9.2), I can't find the best solution for this problem.
Here are what I can imagine as the second best solutions:
Except for the last suggestion, those two above should be in Go 2 milestone since there should be a guarantee that it'll not break the existing code in Go 1.
And you can give a look at this code, which might be DEFINITELY not the one you were looking for: https://play.golang.org/p/3G7dNIPYdMo
It's not that obscure. This bit me today and had me debugging for quite some time till I realised this was a bug in master. I believe something like
Failing code - https://github.com/agnivade/funnel/blob/master/rollup.go#L19
tt := time.Now().UTC() t.Log(tt.Format("2006-01-02_15-04-05")) t.Log(tt.Format("2006-01-02#15-04-05"))
The results are pretty drastically different. "_07" to " 127". I would recommend rollback.