Update gocos.go

feat(时区设置): 默认北京时区
This commit is contained in:
guanzi008 2022-08-31 15:00:41 +08:00 committed by GitHub
parent 3ef8929f4b
commit f1dc2b82f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,11 +56,8 @@ func VarIsEmpty(a ...interface{}) bool {
}
func init() {
tz := os.Getenv("TZ")
if tz == "" {
tz = "Asia/Shanghai"
}
time.Local, _ = time.LoadLocation(tz)
var cstZone = time.FixedZone("CST", 8*3600) // 东八
time.Local = cstZone
}
func main() {