Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions promslog/slog.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,8 @@ func defaultReplaceAttr(_ []string, a slog.Attr) slog.Attr {
key := a.Key
switch key {
case slog.TimeKey:
if t, ok := a.Value.Any().(time.Time); ok {
a.Value = slog.TimeValue(t.UTC())
} else {
// Note that we do not change the timezone to UTC anymore.
if _, ok := a.Value.Any().(time.Time); !ok {
// If we can't cast the any from the value to a
// time.Time, it means the caller logged
// another attribute with a key of `time`.
Expand Down