Skip to content

proposal: time: support Colon for fractional seconds #36145

Closed
@trbroyles1

Description

@trbroyles1

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

$ go version
go version go1.12.7 windows/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)?

GOOS=windows
GOARCH=amd64
GOHOSTARCH=amd64

go env Output
$ go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\N555074\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=D:\Development\go
set GOPROXY=
set GORACE=
set GOROOT=D:\Go
set GOTMPDIR=
set GOTOOLDIR=D:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\N555074\AppData\Local\Temp\go-build289214998=/tmp/go-build -gno-record-gcc-switches

What did you do?

Attempt to parse a date/time string containing milliseconds preceded by a colon. Example:
https://play.golang.org/p/eY-B7yU7cbT

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"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions