From b667e31dcf56fd6a65512eb88e59ef55437c8577 Mon Sep 17 00:00:00 2001 From: George Baltz N3GB Date: Tue, 10 Sep 2024 03:33:43 -0400 Subject: [PATCH] Fix wrong utc_offset Only compare magnitude when checking for only hours given. Offsets west of UTC could be off by a factor of 100. --- tests/rigctl_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/rigctl_parse.c b/tests/rigctl_parse.c index 09f49dc20..c4ea871c7 100644 --- a/tests/rigctl_parse.c +++ b/tests/rigctl_parse.c @@ -5657,7 +5657,7 @@ declare_proto_rig(set_clock) __func__, n, year, mon, day, hour, min, sec, msec, utc_offset >= 0 ? "+" : "-", (unsigned)abs(utc_offset)); - if (utc_offset < 24) { utc_offset *= 100; } // allow for minutes offset too + if (abs(utc_offset) < 24) { utc_offset *= 100; } // allow for minutes offset too rig_debug(RIG_DEBUG_VERBOSE, "%s: utc_offset=%d\n", __func__, utc_offset);