From dc5176515f495aaceff73a5484fa2711c535ab84 Mon Sep 17 00:00:00 2001 From: david gauchard Date: Sun, 7 Jun 2020 17:40:28 +0200 Subject: [PATCH 1/2] keep-up with old configTime usage --- cores/esp8266/time.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cores/esp8266/time.cpp b/cores/esp8266/time.cpp index ae5a187651..c408df1932 100644 --- a/cores/esp8266/time.cpp +++ b/cores/esp8266/time.cpp @@ -157,6 +157,10 @@ void configTime(int timezone_sec, int daylightOffset_sec, const char* server1, c ***/ + const char* tz = getenv("TZ"); + if (timezone_sec == 0 && daylightOffset_sec == 0 && tz != nullptr) + return configTime(tz, server1, server2, server3); + static char gmt[] = "GMT"; _timezone = timezone_sec + daylightOffset_sec; From 3b28151736ce25c3dbd4236457bc5626f2423e21 Mon Sep 17 00:00:00 2001 From: david gauchard Date: Sun, 7 Jun 2020 18:24:48 +0200 Subject: [PATCH 2/2] fix conflict --- cores/esp8266/time.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cores/esp8266/time.cpp b/cores/esp8266/time.cpp index c408df1932..1904f1fd05 100644 --- a/cores/esp8266/time.cpp +++ b/cores/esp8266/time.cpp @@ -157,9 +157,9 @@ void configTime(int timezone_sec, int daylightOffset_sec, const char* server1, c ***/ - const char* tz = getenv("TZ"); - if (timezone_sec == 0 && daylightOffset_sec == 0 && tz != nullptr) - return configTime(tz, server1, server2, server3); + const char* tzenv = getenv("TZ"); + if (timezone_sec == 0 && daylightOffset_sec == 0 && tzenv != nullptr) + return configTime(tzenv, server1, server2, server3); static char gmt[] = "GMT";