From d66e745b02ad50e6763ec5a0765aae5014a6c188 Mon Sep 17 00:00:00 2001 From: Daniel Swarbrick Date: Fri, 20 Sep 2024 19:25:57 +0200 Subject: [PATCH] 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 --- promslog/slog.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/promslog/slog.go b/promslog/slog.go index 5a3a6f87..fae3684b 100644 --- a/promslog/slog.go +++ b/promslog/slog.go @@ -52,7 +52,7 @@ var ( // of .999999999 which changes the timestamp from 9 variable to 3 fixed // decimals (.130 instead of .130987456). t := a.Value.Time() - a.Value = slog.StringValue(t.Format("2006-01-02T15:04:05.000Z07:00")) + a.Value = slog.StringValue(t.UTC().Format("2006-01-02T15:04:05.000Z07:00")) case slog.SourceKey: a.Key = "caller" src, _ := a.Value.Any().(*slog.Source)