I\'m trying to parse an Unix timestamp but I get out of range error. That doesn\'t really makes sense to me, because the layout is correct (as in the Go docs):
Just use time.Parse
example:
package main
import (
"fmt"
"time"
)
func main() {
fromString := "Wed, 6 Sep 2017 10:43:01 +0300"
t, e := time.Parse("Mon, _2 Jan 2006 15:04:05 -0700", fromString)
if e != nil {
fmt.Printf("err: %s\n", e)
}
fmt.Printf("UTC time: %v\n", t.UTC())
}
Working example on play.golang.org.