Thank you.
вторник, 2 июля 2019 г., 22:26:39 UTC+4 пользователь mb0 написал:
>
> the format time uses a minus sign '-' instead of a plus
>
> https://play.golang.org/p/pXDXm0KmwTz
>
> have fun!
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group
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:0
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":