mirror of https://github.com/arendst/Tasmota.git
Zero fill millis positions to three digits
This commit is contained in:
parent
9a7f252d88
commit
b3540879ab
|
@ -997,7 +997,7 @@ char* ResponseGetTime(uint32_t format, char* time_str)
|
|||
snprintf_P(time_str, TIMESZ, PSTR("{\"" D_JSON_TIME "\":%u"), UtcTime());
|
||||
break;
|
||||
case 3:
|
||||
snprintf_P(time_str, TIMESZ, PSTR("{\"" D_JSON_TIME "\":\"%s.%d\""), GetDateAndTime(DT_LOCAL).c_str(), RtcMillis());
|
||||
snprintf_P(time_str, TIMESZ, PSTR("{\"" D_JSON_TIME "\":\"%s.%03d\""), GetDateAndTime(DT_LOCAL).c_str(), RtcMillis());
|
||||
break;
|
||||
default:
|
||||
snprintf_P(time_str, TIMESZ, PSTR("{\"" D_JSON_TIME "\":\"%s\""), GetDateAndTime(DT_LOCAL).c_str());
|
||||
|
|
Loading…
Reference in New Issue