Go time Package Format()
package main//from ww w . ja v a2s .c o m import ( "fmt" "time" ) func main() { t, err := time.Parse(time.RFC3339, "2006-01-02T15:04:05Z") if err != nil { fmt.Println(err) } fmt.Println(t) loc, err := time.LoadLocation("America/Los_Angeles") if err != nil { fmt.Println(err) } fmt.Println(loc) t = t.In(loc) fmt.Println(t.Format(time.RFC822)) }