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),