Browse Source

时区更换为东8区

aries.zhang 5 năm trước cách đây
mục cha
commit
b2689136ba
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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)