Skip to content

Commit 7058582

Browse files
committedSep 21, 2024
fix: convert time to utc
1 parent 292ed33 commit 7058582

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎middleware.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func NewWithConfig(logger *slog.Logger, config Config) func(http.Handler) http.H
143143
baseAttributes := []slog.Attr{}
144144

145145
requestAttributes := []slog.Attr{
146-
slog.Time("time", start),
146+
slog.Time("time", start.UTC()),
147147
slog.String("method", method),
148148
slog.String("host", host),
149149
slog.String("path", path),
@@ -153,7 +153,7 @@ func NewWithConfig(logger *slog.Logger, config Config) func(http.Handler) http.H
153153
}
154154

155155
responseAttributes := []slog.Attr{
156-
slog.Time("time", end),
156+
slog.Time("time", end.UTC()),
157157
slog.Duration("latency", latency),
158158
slog.Int("status", status),
159159
}

0 commit comments

Comments
 (0)