Use two decimals only for exact quarter-hour offsets

This commit is contained in:
Confituurke committed 2026-10-21 11:24:34 +02:00
1 parent 5f967d818a
commit 8c4769d1ed
1 file changed
+2 -1
+2 -1
View File
@@ -2192,7 +2192,8 @@ bool MyMesh::handleCommand(const char* command, uint32_t sender_timestamp, char*
}
if (strcmp(command, "get tz.offset") == 0) {
sprintf(reply, ((int)(_prefs.tz_offset * 4) % 2) ? "> %.2f" : "> %.1f", _prefs.tz_offset);
float q = _prefs.tz_offset * 4;
sprintf(reply, (q == (int)q && ((int)q & 1)) ? "> %.2f" : "> %.1f", _prefs.tz_offset);
return true;
}
if (memcmp(command, "set tz.offset ", 14) == 0) {