go mongo 时区问题
https://zhuanlan.zhihu.com/p/479189070
func main() { sh, err := time.LoadLocation("Asia/Shanghai") //设置时区 if err != nil { sh = time.FixedZone("CST", 8*3600) //替换上海时区 } time.Local = sh if beego.BConfig.RunMode == "dev" { beego.BConfig.WebConfig.DirectoryIndex = true beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger" } beego.Run() }