From d1aeaaf15c3a867f121080b1ed5b585edce9d433 Mon Sep 17 00:00:00 2001 From: David Gauchard Date: Mon, 9 Mar 2020 16:30:08 +0100 Subject: [PATCH] avoid printing nullptr string --- libraries/esp8266/examples/NTP-TZ-DST/NTP-TZ-DST.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/esp8266/examples/NTP-TZ-DST/NTP-TZ-DST.ino b/libraries/esp8266/examples/NTP-TZ-DST/NTP-TZ-DST.ino index 33cd14603a..3a16efb612 100644 --- a/libraries/esp8266/examples/NTP-TZ-DST/NTP-TZ-DST.ino +++ b/libraries/esp8266/examples/NTP-TZ-DST/NTP-TZ-DST.ino @@ -134,7 +134,7 @@ void showTime() { Serial.println((uint32_t)now); // timezone and demo in the future - Serial.printf("timezone: %s\n", getenv("TZ")); + Serial.printf("timezone: %s\n", getenv("TZ") ? : "(none)"); // human readable Serial.print("ctime: ");