Open waged opened 3 years ago
My ESP32 Wrover one time per 10 get the wrong time like "2036-2-7T6:28:16" although i check the strDateTime.isValid and it's true. the router NTP time is correct and never sending the wrong time but it could be little slow.
NTPtime NTPch("pool.ntp.org"); NTPch.setRecvTimeout(5); dateTime = NTPch.getNTPtime(0.0, 0); if (dateTime.valid) { actualHours = dateTime.hour; actualMinutes = dateTime.minute; actualSeconds = dateTime.second; actualYear = dateTime.year; actualMonth = dateTime.month; actualDays = dateTime.day; Serial.printf("Year: %d, Month: %d, Day: %d, Hours: %d, Minutes: %d \n", actualYear, actualMonth, actualDays, actualHours, actualMinutes); }
Same issue. Any workaround?
My ESP32 Wrover one time per 10 get the wrong time like "2036-2-7T6:28:16" although i check the strDateTime.isValid and it's true. the router NTP time is correct and never sending the wrong time but it could be little slow.
NTPtime NTPch("pool.ntp.org"); NTPch.setRecvTimeout(5); dateTime = NTPch.getNTPtime(0.0, 0); if (dateTime.valid) { actualHours = dateTime.hour; actualMinutes = dateTime.minute; actualSeconds = dateTime.second; actualYear = dateTime.year; actualMonth = dateTime.month; actualDays = dateTime.day; Serial.printf("Year: %d, Month: %d, Day: %d, Hours: %d, Minutes: %d \n", actualYear, actualMonth, actualDays, actualHours, actualMinutes); }