From bd3c7a827be51217067443664f79ec52f50650ed Mon Sep 17 00:00:00 2001 From: Samuel Berthe Date: Sun, 22 Sep 2024 00:18:37 +0200 Subject: [PATCH] fix: convert time to utc --- middleware.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/middleware.go b/middleware.go index 6e28f3b..71faf6c 100644 --- a/middleware.go +++ b/middleware.go @@ -148,7 +148,7 @@ func NewWithConfig(logger *slog.Logger, config Config) gin.HandlerFunc { baseAttributes := []slog.Attr{} requestAttributes := []slog.Attr{ - slog.Time("time", start), + slog.Time("time", start.UTC()), slog.String("method", method), slog.String("host", host), slog.String("path", path), @@ -160,7 +160,7 @@ func NewWithConfig(logger *slog.Logger, config Config) gin.HandlerFunc { } responseAttributes := []slog.Attr{ - slog.Time("time", end), + slog.Time("time", end.UTC()), slog.Duration("latency", latency), slog.Int("status", status), }