> > >
package main
import (
"fmt"
"time"
)
func main() {
, _ := time.LoadLocation("Asia/Shanghai")
loc:= time.Now().In(loc)
t .Println(t)
fmt}
Layout should follow this date time: Mon, 02 Jan 2006 15:04:05 -0700
e.g.:
, err := time.Parse("2006-01-02 15:04:05 -0700", input) t
https://yourbasic.org/golang/format-parse-string-time-date-example/