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: support parsing and formatting timestamps that don't use period for fractional seconds #26002

Closed
theckman opened this issue Jun 21, 2018 · 3 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@theckman
Copy link
Contributor

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

go version go1.10.1 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/theckman/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/theckman/go/"
GORACE=""
GOROOT="/Users/theckman/.gimme/versions/go1.10.1.darwin.amd64"
GOTMPDIR=""
GOTOOLDIR="/Users/theckman/.gimme/versions/go1.10.1.darwin.amd64/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/f5/zjcsdkrx2bxdm32zzqfg5yp80000gn/T/go-build809411951=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

https://play.golang.org/p/TEo-WL4gGsq

What did you expect to see?

I expected to be able to use either 2006-01-02 15:04:05,999 or 2006-01-02 15:04:05,000 to parse a timestamp like 2018-06-15 18:12:22,013. Especially as some written languages / countries use , to indicate fractions instead of ..

What did you see instead?

An error indicating that 013 could not be parsed in to ,999.

@lrewega
Copy link

lrewega commented Jun 21, 2018

Looks similar to #6189

@ianlancetaylor ianlancetaylor added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 21, 2018
@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Jun 21, 2018
@AlekSi
Copy link
Contributor

AlekSi commented Aug 9, 2019

Let's close that one as a duplicate for #6189.

@agnivade
Copy link
Contributor

agnivade commented Aug 9, 2019

Rightly noted. Closing it then. Please shout if it's a mistake.

@agnivade agnivade closed this as completed Aug 9, 2019
@golang golang locked and limited conversation to collaborators Aug 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants