mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 04:30:05 +00:00
🐛 fix service stats
This commit is contained in:
@@ -358,7 +358,7 @@ func handleHttpGetTask(task *pb.Task, result *pb.TaskResult) {
|
||||
// 检查 SSL 证书信息
|
||||
if resp.TLS != nil && len(resp.TLS.PeerCertificates) > 0 {
|
||||
c := resp.TLS.PeerCertificates[0]
|
||||
result.Data = c.Issuer.CommonName + "|" + c.NotAfter.In(time.Local).String()
|
||||
result.Data = c.Issuer.CommonName + "|" + c.NotAfter.String()
|
||||
}
|
||||
result.Successful = true
|
||||
} else {
|
||||
|
||||
@@ -183,7 +183,7 @@ var funcMap = template.FuncMap{
|
||||
},
|
||||
"dayBefore": func(i int) string {
|
||||
year, month, day := time.Now().Date()
|
||||
today := time.Date(year, month, day, 0, 0, 0, 0, time.Local)
|
||||
today := time.Date(year, month, day, 0, 0, 0, 0, singleton.Loc)
|
||||
return today.AddDate(0, 0, i-29).Format("01/02")
|
||||
},
|
||||
"className": func(percent float32) string {
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
|
||||
func init() {
|
||||
// 初始化 dao 包
|
||||
singleton.Init()
|
||||
singleton.InitConfigFromPath("data/config.yaml")
|
||||
singleton.InitTimezoneAndCache()
|
||||
singleton.InitDBFromPath("data/sqlite.db")
|
||||
singleton.InitLocalizer()
|
||||
initSystem()
|
||||
|
||||
Reference in New Issue
Block a user