您可以用户功能FixedZone或LoadLocation获得*Location
,然后使用*Location在func In
// get the location
location,_ := time.LoadLocation("Europe/Rome")
// this should give you time in location
t := time.Now().In(location)
fmt.Println(t)
Run Code Online (Sandbox Code Playgroud)
这里有更多文档https://golang.org/pkg/time/#Time