From ccf97c55a581529f42342f8859dcfa1c1edf3ba1 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Fri, 17 Feb 2017 15:47:45 +0100 Subject: [PATCH] Don't forget to assign the resulting date. --- postfix_exporter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postfix_exporter.go b/postfix_exporter.go index 24b5c3e..c98c68a 100644 --- a/postfix_exporter.go +++ b/postfix_exporter.go @@ -85,7 +85,7 @@ func CollectShowqFromReader(file io.Reader, ch chan<- prometheus.Metric) error { } date = date.AddDate(now.Year(), 0, 0) if date.After(now) { - date.AddDate(-1, 0, 0) + date = date.AddDate(-1, 0, 0) } sizeHistogram.Observe(size)