From 5e63bbed1aa76e6a4ba207405e314a5ca1744c4f Mon Sep 17 00:00:00 2001 From: Emanuele Vicentini Date: Thu, 29 Aug 2024 08:24:36 +0200 Subject: [PATCH] Fixed parsing of timestamps with non-zero padded days (#841) Signed-off-by: Emanuele Vicentini --- collector/collector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/collector.go b/collector/collector.go index 02e1b01e..89324f0a 100644 --- a/collector/collector.go +++ b/collector/collector.go @@ -59,7 +59,7 @@ func parseStatus(data sql.RawBytes) (float64, bool) { case "non-primary", "disconnected": return 0, true } - if ts, err := time.Parse("Jan 02 15:04:05 2006 MST", string(data)); err == nil { + if ts, err := time.Parse("Jan _2 15:04:05 2006 MST", string(data)); err == nil { return float64(ts.Unix()), true } if ts, err := time.Parse(time.DateTime, string(data)); err == nil {