From 3c1c031404c3bca12d2b597ac699c4de42f38d9f Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Thu, 5 Dec 2024 22:34:16 +0100 Subject: [PATCH] worldclock: Fix double minus sign --- plugin/worldclock/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/worldclock/api.go b/plugin/worldclock/api.go index c2a4355..7b805ff 100644 --- a/plugin/worldclock/api.go +++ b/plugin/worldclock/api.go @@ -14,9 +14,9 @@ type Response struct { } func (r *Response) GmtOffsetFormatted() string { - sign := "+" - if r.GmtOffset < 0 { - sign = "-" + var sign string + if r.GmtOffset > 0 { + sign = "+" } hours := r.GmtOffset / 3600 minutes := (r.GmtOffset % 3600) / 60