This commit is contained in:
cdle
2023-06-16 09:37:19 +08:00
parent b900abaea3
commit bd67023a35
3 changed files with 15 additions and 2 deletions
+14
View File
@@ -0,0 +1,14 @@
package core
import "time"
var loc *time.Location
func initLoc() {
var err error
loc, err = time.LoadLocation("Asia/Shanghai")
if err != nil {
loc = time.FixedZone("CST", 8*3600)
}
time.Local = loc
}