Skip to content

Commit 84e03ab

Browse files
committed
Revert "Examples update, add a note for configTime() that only one ntp server is supported by lwip",
fixed in espressif/esp32-arduino-lib-builder#51 This reverts commit 6b10209.
1 parent caef400 commit 84e03ab

File tree

7 files changed

+0
-28
lines changed

7 files changed

+0
-28
lines changed

cores/esp32/esp32-hal-time.c

-4
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ static void setTimeZone(long offset, int daylight)
4444
/*
4545
* configTime
4646
* Source: https://github.com/esp8266/Arduino/blob/master/cores/esp8266/time.c
47-
* Note: Bundled Arduino lwip supports only ONE ntp server, 2nd and 3rd options are silently ignored
48-
* see CONFIG_LWIP_DHCP_MAX_NTP_SERVERS define in ./tools/sdk/esp32/sdkconfig
4947
* */
5048
void configTime(long gmtOffset_sec, int daylightOffset_sec, const char* server1, const char* server2, const char* server3)
5149
{
@@ -65,8 +63,6 @@ void configTime(long gmtOffset_sec, int daylightOffset_sec, const char* server1,
6563
/*
6664
* configTzTime
6765
* sntp setup using TZ environment variable
68-
* Note: Bundled Arduino lwip supports only ONE ntp server, 2nd and 3rd options are silently ignored
69-
* see CONFIG_LWIP_DHCP_MAX_NTP_SERVERS define in ./tools/sdk/esp32/sdkconfig
7066
* */
7167
void configTzTime(const char* tz, const char* server1, const char* server2, const char* server3)
7268
{

libraries/FFat/examples/FFat_time/FFat_time.ino

-4
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,6 @@ void setup(){
148148
Serial.println("IP address: ");
149149
Serial.println(WiFi.localIP());
150150
Serial.println("Contacting Time Server");
151-
/*
152-
Note: Bundled Arduino lwip supports only ONE ntp server, 2nd and 3rd options are silently ignored
153-
see CONFIG_LWIP_DHCP_MAX_NTP_SERVERS define in ./tools/sdk/esp32/sdkconfig
154-
*/
155151
configTime(3600*timezone, daysavetime*3600, "time.nist.gov", "0.pool.ntp.org", "1.pool.ntp.org");
156152
struct tm tmstruct ;
157153
delay(2000);

libraries/HTTPUpdate/examples/httpUpdateSecure/httpUpdateSecure.ino

-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ WiFiMulti WiFiMulti;
1717

1818
// Set time via NTP, as required for x.509 validation
1919
void setClock() {
20-
/*
21-
Note: Bundled Arduino lwip supports only ONE ntp server, 2nd and 3rd options are silently ignored
22-
see CONFIG_LWIP_DHCP_MAX_NTP_SERVERS define in ./tools/sdk/esp32/sdkconfig
23-
*/
2420
configTime(0, 0, "pool.ntp.org", "time.nist.gov"); // UTC
2521

2622
Serial.print(F("Waiting for NTP time sync: "));

libraries/LittleFS/examples/LITTLEFS_time/LITTLEFS_time.ino

-4
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,6 @@ void setup(){
160160
Serial.println("IP address: ");
161161
Serial.println(WiFi.localIP());
162162
Serial.println("Contacting Time Server");
163-
/*
164-
Note: Bundled Arduino lwip supports only ONE ntp server, 2nd and 3rd options are silently ignored
165-
see CONFIG_LWIP_DHCP_MAX_NTP_SERVERS define in ./tools/sdk/esp32/sdkconfig
166-
*/
167163
configTime(3600*timezone, daysavetime*3600, "time.nist.gov", "0.pool.ntp.org", "1.pool.ntp.org");
168164
struct tm tmstruct ;
169165
delay(2000);

libraries/SD/examples/SD_time/SD_time.ino

-4
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,6 @@ void setup(){
164164
Serial.println("IP address: ");
165165
Serial.println(WiFi.localIP());
166166
Serial.println("Contacting Time Server");
167-
/*
168-
Note: Bundled Arduino lwip supports only ONE ntp server, 2nd and 3rd options are silently ignored
169-
see CONFIG_LWIP_DHCP_MAX_NTP_SERVERS define in ./tools/sdk/esp32/sdkconfig
170-
*/
171167
configTime(3600*timezone, daysavetime*3600, "time.nist.gov", "0.pool.ntp.org", "1.pool.ntp.org");
172168
struct tm tmstruct ;
173169
delay(2000);

libraries/SD_MMC/examples/SDMMC_time/SDMMC_time.ino

-4
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,6 @@ void setup(){
164164
Serial.println("IP address: ");
165165
Serial.println(WiFi.localIP());
166166
Serial.println("Contacting Time Server");
167-
/*
168-
Note: Bundled Arduino lwip supports only ONE ntp server, 2nd and 3rd options are silently ignored
169-
see CONFIG_LWIP_DHCP_MAX_NTP_SERVERS define in ./tools/sdk/esp32/sdkconfig
170-
*/
171167
configTime(3600*timezone, daysavetime*3600, "time.nist.gov", "0.pool.ntp.org", "1.pool.ntp.org");
172168
struct tm tmstruct ;
173169
delay(2000);

libraries/SPIFFS/examples/SPIFFS_time/SPIFFS_time.ino

-4
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,6 @@ void setup(){
148148
Serial.println("IP address: ");
149149
Serial.println(WiFi.localIP());
150150
Serial.println("Contacting Time Server");
151-
/*
152-
Note: Bundled Arduino lwip supports only ONE ntp server, 2nd and 3rd options are silently ignored
153-
see CONFIG_LWIP_DHCP_MAX_NTP_SERVERS define in ./tools/sdk/esp32/sdkconfig
154-
*/
155151
configTime(3600*timezone, daysavetime*3600, "time.nist.gov", "0.pool.ntp.org", "1.pool.ntp.org");
156152
struct tm tmstruct ;
157153
delay(2000);

0 commit comments

Comments
 (0)