the format time uses a minus sign '-' instead of a plus
https://play.golang.org/p/pXDXm0KmwTz
have fun!
On 02.07.19 20:11, 'Константин Иванов' via golang-nuts wrote:
https://play.golang.org/p/4Rr2xVGKnQg
|
packagemain
import(
"fmt"
"time"
)
constin="+03:00"// "2019-07-02T19:28:39.403+03:00"
constTIME ="+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
<mailto: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
<https://groups.google.com/d/msgid/golang-nuts/5c6cdaa3-b549-4583-aa19-d4231605953e%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
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/001734e0-8b48-6a89-9a04-4ec46b782e80%40mb0.org.
For more options, visit https://groups.google.com/d/optout.