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.
This commit is contained in:
George Baltz N3GB 2024-09-10 03:33:43 -04:00
parent 99535c0682
commit b667e31dcf

View File

@ -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);