diff --git a/src/WebApi_ntp.cpp b/src/WebApi_ntp.cpp index 47726d6..48bcb6c 100644 --- a/src/WebApi_ntp.cpp +++ b/src/WebApi_ntp.cpp @@ -228,21 +228,21 @@ void WebApiNtpClass::onNtpTimePost(AsyncWebServerRequest* request) return; } - if (root[F("hour")].as() < 0 || root[F("hour")].as() > 23) { + if (root[F("hour")].as() > 23) { retMsg[F("message")] = F("Hour must be a number between 0 and 23!"); response->setLength(); request->send(response); return; } - if (root[F("minute")].as() < 0 || root[F("minute")].as() > 59) { + if (root[F("minute")].as() > 59) { retMsg[F("message")] = F("Minute must be a number between 0 and 59!"); response->setLength(); request->send(response); return; } - if (root[F("second")].as() < 0 || root[F("second")].as() > 59) { + if (root[F("second")].as() > 59) { retMsg[F("message")] = F("Second must be a number between 0 and 59!"); response->setLength(); request->send(response);