From ca411e9e2c9f7d8d60e819402d62df9552a47233 Mon Sep 17 00:00:00 2001 From: NorthLan <6995syu@163.com> Date: Thu, 13 Oct 2022 21:45:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dwin=E4=B8=8Bgorm?= =?UTF-8?q?=E6=97=A0=E6=B3=95open=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E5=AE=9E=E9=99=85=E6=98=AFtimezone=E8=AF=BB=E5=8F=96=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/user_center/rpc/user_center.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/user_center/rpc/user_center.go b/app/user_center/rpc/user_center.go index a0d155e..68101b0 100644 --- a/app/user_center/rpc/user_center.go +++ b/app/user_center/rpc/user_center.go @@ -12,6 +12,8 @@ import ( "live-service/app/user_center/rpc/internal/svc" "live-service/app/user_center/rpc/pb" "live-service/common/interceptor/rpcserver" + "os" + "path/filepath" "github.com/zeromicro/go-zero/core/service" "github.com/zeromicro/go-zero/zrpc" @@ -30,6 +32,11 @@ func main() { var cg config.GameConfig config.MustLoad(*configFile, &cg) + err := os.Setenv("ZONEINFO", filepath.Join("./", "zoneinfo.zip")) + if err != nil { + panic(err) + } + ctx := svc.NewServiceContext(&c, &cg) svr := server.NewUserCenterServer(ctx)