fix: convert time to utc

This commit is contained in:
Samuel Berthe
2024-09-22 00:18:37 +02:00
parent d50c81de7d
commit bd3c7a827b
+2 -2
View File
@@ -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),
}