统一时间格式和时区

This commit is contained in:
yml2213
2026-07-31 12:57:17 +08:00
parent 667bfbde06
commit 949a0eb8f7
24 changed files with 342 additions and 49 deletions
+3
View File
@@ -3,6 +3,7 @@ package main
import (
"context"
"log"
"time"
"affiliate_dash/internal/config"
"affiliate_dash/internal/database"
@@ -10,6 +11,7 @@ import (
"affiliate_dash/internal/pkg/applog"
"affiliate_dash/internal/pkg/jwt"
"affiliate_dash/internal/pkg/openlog"
"affiliate_dash/internal/pkg/timeutil"
"affiliate_dash/internal/router"
"affiliate_dash/internal/service"
@@ -20,6 +22,7 @@ import (
func main() {
cfg := config.Load()
time.Local = timeutil.Location()
// 日志:控制台 + 文件
logFile, err := applog.Setup(cfg.LogFile)