From 21715e2dc3719c395d6c9376a9feadd283005fc2 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Tue, 21 Mar 2017 15:41:16 +0100 Subject: [PATCH] Use the right timezone for the timestamps in the client stats. --- openvpn_exporter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openvpn_exporter.go b/openvpn_exporter.go index b752b60..9286335 100644 --- a/openvpn_exporter.go +++ b/openvpn_exporter.go @@ -183,7 +183,7 @@ func CollectClientStatusFromReader(statusPath string, file io.Reader, ch chan<- ch <- prometheus.MustNewConstMetric( openvpnStatusUpdateTimeDesc, prometheus.GaugeValue, - float64(time.Unix()), + float64(time.Local().Unix()), statusPath) } else if desc, ok := openvpnClientDescs[fields[0]]; ok && len(fields) == 2 { // Traffic counters.