时间函数使用utc时间计算,预防切换夏令时bug

This commit is contained in:
ayflying
2025-02-25 15:19:42 +08:00
parent 4862dcd1d8
commit 36a34891db
5 changed files with 232 additions and 21 deletions

View File

@@ -1,6 +1,7 @@
package aycache
import (
"github.com/ayflying/utility_go/aycache/drive"
"github.com/gogf/gf/v2/os/gcache"
)
@@ -24,6 +25,10 @@ func New(_name ...string) gcache.Adapter {
cacheAdapterObj = NewAdapterMemory()
case "redis":
cacheAdapterObj = NewAdapterRedis()
case "file":
cacheAdapterObj = NewAdapterFile("runtime/cache")
case "es":
cacheAdapterObj = drive.NewAdapterElasticsearch([]string{"http://127.0.0.1:9200"})
}
//var client = gcache.New()