Ver código fonte

时区更换为东8区

aries.zhang 5 anos atrás
pai
commit
b2689136ba
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      engine/system_init.go

+ 2 - 2
engine/system_init.go

@@ -213,8 +213,8 @@ func initOrmEngine(orm *xorm.Engine, driverName string) {
 	//设置时区
 	orm.DatabaseTZ = time.Local // 必须
 	orm.TZLocation = time.Local // 必须
-	time.LoadLocation("Asia/Shanghai")
-
+	// time.LoadLocation("Asia/Shanghai")
+	time.FixedZone("CST", 8*3600)
 	orm.StartFSWatcher()
 
 	orm.ShowSQL(true)