Show quarter-hour timezone offsets with two decimals
'get tz.offset' printed one decimal, so a UTC+5:45 offset (5.75) read back as 5.8. Print two decimals when the offset is on a quarter hour (x.25 / x.75); everything else keeps one decimal.
This commit is contained in:
1 parent
c9fa617c38
commit
5f967d818a
1 file changed
+1
-1
@@ -2192,7 +2192,7 @@ bool MyMesh::handleCommand(const char* command, uint32_t sender_timestamp, char*
|
||||
}
|
||||
|
||||
if (strcmp(command, "get tz.offset") == 0) {
|
||||
sprintf(reply, "> %.1f", _prefs.tz_offset);
|
||||
sprintf(reply, ((int)(_prefs.tz_offset * 4) % 2) ? "> %.2f" : "> %.1f", _prefs.tz_offset);
|
||||
return true;
|
||||
}
|
||||
if (memcmp(command, "set tz.offset ", 14) == 0) {
|
||||
|
||||
Reference in new issue
Block a user