From fefd4af10cd0c79fe37887f4160d4ec28e636bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Thu, 4 Jul 2024 16:54:23 +0200 Subject: [PATCH] Present times in configured timezone --- datapoint.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datapoint.go b/datapoint.go index a75491a..2d2286e 100644 --- a/datapoint.go +++ b/datapoint.go @@ -54,14 +54,14 @@ func (dp DatapointValue) Value() any { // {{{ } if dp.ValueDateTime.Valid { - return dp.ValueDateTime.Time + return dp.ValueDateTime.Time.In(smonConfig.timezoneLocation) } return nil } // }}} func (dp DatapointValue) FormattedTime() string { // {{{ if dp.ValueDateTime.Valid { - return dp.ValueDateTime.Time.Format("2006-01-02 15:04:05") + return dp.ValueDateTime.Time.In(smonConfig.timezoneLocation).Format("2006-01-02 15:04:05") } return "invalid time" } // }}}