Hi,
I am trying to parse time coming in "6/9/15 15:54:04:393 CST" format. Note
: before millisecond. When there is dot before millisecond, time.parse is
working fine.. but when there is : before millisecond, time.parse does not
work. am I missing anything?
I tried the following
package main
import (
"fmt"
"time"
)
func main() {
const inputTime = "1/2/06 15:04:05:000 MST"
t, _ := time.Parse(inputTime, "6/9/15 15:54:04:393 CST")
fmt.Println(t)
fmt.Println(t.Format("2006-01-02T15:04:05.000-0700"))
}
but I get the following
0001-01-01 00:00:00 +0000 UTC
0001-01-01T00:00:00.000+0000
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.