From 6567a1dc354d175d3446ffe24a6554fa0940add8 Mon Sep 17 00:00:00 2001 From: Egor Matveev Date: Sun, 15 Jun 2025 00:56:54 +0300 Subject: [PATCH] fix --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index ed4c9d4..c7d2fdb 100644 --- a/main.go +++ b/main.go @@ -15,9 +15,10 @@ import ( ) func writeMetric(timestamp time.Time, endpoint string, statusCode int, responseTime int, method string) { + loc, _ := time.LoadLocation("Europe/Moscow") s := fmt.Sprintf( `{"timestamp":"%s","service":"queues","environment":"%s","endpoint":"%s","status_code":%s,"response_time":%s,"method":"%s"}`, - timestamp.Format("2006-01-02T15:04:05Z"), + timestamp.In(loc).Format("2006-01-02T15:04:05Z"), os.Getenv("STAGE"), endpoint, strconv.Itoa(statusCode), -- 2.45.2