Skip to content

Commit

Permalink
fix: convert time to utc
Browse files Browse the repository at this point in the history
  • Loading branch information
samber committed Sep 21, 2024
1 parent 6cddf0d commit 5c3a32c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func NewWithConfig(logger *slog.Logger, config Config) fiber.Handler {
baseAttributes := []slog.Attr{}

requestAttributes := []slog.Attr{
slog.Time("time", start),
slog.Time("time", start.UTC()),
slog.String("method", string(method)),
slog.String("host", host),
slog.String("path", path),
Expand All @@ -169,7 +169,7 @@ func NewWithConfig(logger *slog.Logger, config Config) fiber.Handler {
}

responseAttributes := []slog.Attr{
slog.Time("time", end),
slog.Time("time", end.UTC()),
slog.Duration("latency", latency),
slog.Int("status", status),
}
Expand Down

0 comments on commit 5c3a32c

Please sign in to comment.