We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f51dfd commit 11e0a5bCopy full SHA for 11e0a5b
SmartEVSE-3/src/network_common.cpp
@@ -1499,10 +1499,12 @@ void WiFiSetup(void) {
1499
void network_loop() {
1500
static unsigned long lastCheck_net = 0;
1501
static int seconds = 0;
1502
+ time_t now;
1503
if (millis() - lastCheck_net >= 1000) {
1504
lastCheck_net = millis();
1505
//this block is for non-time critical stuff that needs to run approx 1 / second
- getLocalTime(&timeinfo, 1000U);
1506
+ time(&now); // get seconds since Epoch
1507
+ localtime_r(&now, &timeinfo); // convert seconds to localtime
1508
if (!LocalTimeSet && WIFImode == 1) {
1509
_LOG_A("Time not synced with NTP yet.\n");
1510
}
0 commit comments