https://play.golang.org/p/4Rr2xVGKnQg


package main

import (
    "fmt"
    "time"
)

const in = "+03:00" // "2019-07-02T19:28:39.403+03:00"

const TIME = "+07:00" // "2006-01-02T15:04:05.999+07:00"

func main() {
    fmt.Println(time.Parse(TIME, in))
}


Got << parsing time "+03:00" as "+07:00": cannot parse "3:00" as "+07:00" >>

Godoc says:

Numeric time zone offsets format as follows: 
>
> -0700  ±hhmm
> -07:00 ±hh:mm
> -07    ±hh
>
> Am I doind something wrong or it is bug?
>
>

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/5c6cdaa3-b549-4583-aa19-d4231605953e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to