diff --git a/common/cool/cool.go b/common/cool/cool.go index d06937485..34af27975 100644 --- a/common/cool/cool.go +++ b/common/cool/cool.go @@ -9,6 +9,7 @@ import ( "github.com/gogf/gf/v2/os/gbuild" "github.com/gogf/gf/v2/os/gcache" "github.com/gogf/gf/v2/os/gctx" + "github.com/gogf/gf/v2/os/gtime" "github.com/gogf/gf/v2/util/guid" "gorm.io/gorm" ) @@ -24,6 +25,10 @@ var ( ) func init() { + err := gtime.SetTimeZone("Asia/Shanghai") + if err != nil { + panic(err) + } var ( ctx = gctx.GetInitCtx() redisConfig = &gredis.Config{} diff --git a/manifest/config/config.yaml b/manifest/config/config.yaml index 92f9dd94e..bc96b36a5 100644 --- a/manifest/config/config.yaml +++ b/manifest/config/config.yaml @@ -19,6 +19,7 @@ database: pass: "hCnKjZRp3jnewzbS" name: "seer" debug: true + timezone: "Asia/Shanghai" createdAt: "createTime" updatedAt: "updateTime" # deletedAt: "deleteTime"