Skip to content

time: support Decimal Comma for fractional seconds #43823

@djaglowski

Description

@djaglowski

What version of Go are you using (go version)?

$ go version
go version go1.15.3 darwin/amd64

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)?

GOARCH=amd64
GOOS=darwin
go env Output
$ go env
GOARCH="amd64"
GOOS="darwin"
...

What 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:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions