From 07395a2f9e23f7cec0057716c334077d2bb36d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E6=B3=93=E9=93=AE?= Date: Wed, 13 Aug 2025 15:21:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=BE=E7=BD=AE=E6=97=B6=E5=8C=BA?= =?UTF-8?q?=E4=B8=BA=E5=8C=97=E4=BA=AC=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/version/VERSION | 2 +- logger.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/version/VERSION b/internal/version/VERSION index b7fffde9..3c60993c 100644 --- a/internal/version/VERSION +++ b/internal/version/VERSION @@ -1 +1 @@ -v5.0.0-250812 +v5.0.0-250813 diff --git a/logger.go b/logger.go index 3d3bcd11..ea7e01ce 100644 --- a/logger.go +++ b/logger.go @@ -18,7 +18,11 @@ func InitLogger(logLevel string, logJSON bool, logFile bool) { // Error Logging with Stacktrace zerolog.ErrorStackMarshaler = pkgerrors.MarshalStack - // set log timestamp precise to milliseconds + // set log timestamp precise to milliseconds with Beijing timezone (UTC+8) + beijingLoc, _ := time.LoadLocation("Asia/Shanghai") + zerolog.TimestampFunc = func() time.Time { + return time.Now().In(beijingLoc) + } zerolog.TimeFieldFormat = "2006-01-02T15:04:05.999Z0700" // init log writers