-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: support Decimal Comma for fractional seconds #43823
Comments
The proposal here is to accept 05,000 as the same as 05.000 in a time format (and similarly for other numbers of zeros). |
/cc @robpike |
@rsc That's correct. |
Seems reasonable on its own, although I am wary of what might follow. Internationalization was never the goal of this package. |
It's definitely not a goal to do full internationalization, but ISO-8601 does recognize , as a decimal fraction separator, so at least we are following a defined standard for times. And it does not have any other internationalization-related changes, so that's a clear line we can refer to if people want other changes. In particular, I don't think this opens us to internationalized month and day names. Those will stay just the English set. |
Based on the discussion above, this proposal seems like a likely accept. |
No change in consensus, so accepted. 🎉 |
Change https://golang.org/cl/300996 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, I can reproduce it on the playground
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Attempt to parse a date/time string containing milliseconds preceded by a decimal comma. Example:
https://play.golang.org/p/wxEOUEVvgaV
What did you expect to see?
Time is 02/12/2019 15:45:48,746
What did you see instead?
parsing time "02/12/2019 15:45:48,746" as "02/01/2006 15:04:05,000": cannot parse "746" as ",000"
Additional Context
ISO_8601 states that decimal comma is a supported, even preferred, value for the separator between seconds and fractional seconds.
Related Issues:
The text was updated successfully, but these errors were encountered: