ntp status and time button

This commit is contained in:
MichaelDvP
2022-04-04 11:12:18 +02:00
parent 26758b965d
commit 462bf81be1
4 changed files with 12 additions and 6 deletions

View File

@@ -59,7 +59,7 @@ void NTPSettingsService::configureNTP() {
}
void NTPSettingsService::configureTime(AsyncWebServerRequest * request, JsonVariant & json) {
if (!sntp_enabled() && json.is<JsonObject>()) {
if (json.is<JsonObject>()) {
struct tm tm = {0};
String timeLocal = json["local_time"];
char * s = strptime(timeLocal.c_str(), "%Y-%m-%dT%H:%M:%S", &tm);