Skip to content

Commit d66e745

Browse files
authored
promslog: use UTC timestamps for go-kit log style (#696)
promlog initialized its go-kit logger to use UTC timestamps, so for true backwards compatibility, the go-kit log style in promslog should retain that configuration. Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
1 parent 14bac55 commit d66e745

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

promslog/slog.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ var (
5252
// of .999999999 which changes the timestamp from 9 variable to 3 fixed
5353
// decimals (.130 instead of .130987456).
5454
t := a.Value.Time()
55-
a.Value = slog.StringValue(t.Format("2006-01-02T15:04:05.000Z07:00"))
55+
a.Value = slog.StringValue(t.UTC().Format("2006-01-02T15:04:05.000Z07:00"))
5656
case slog.SourceKey:
5757
a.Key = "caller"
5858
src, _ := a.Value.Any().(*slog.Source)

0 commit comments

Comments
 (0)