Skip to content

Commit afb9921

Browse files
authored
avoid printing nullptr string (#7144)
1 parent 845241b commit afb9921

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/esp8266/examples/NTP-TZ-DST/NTP-TZ-DST.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ void showTime() {
134134
Serial.println((uint32_t)now);
135135

136136
// timezone and demo in the future
137-
Serial.printf("timezone: %s\n", getenv("TZ"));
137+
Serial.printf("timezone: %s\n", getenv("TZ") ? : "(none)");
138138

139139
// human readable
140140
Serial.print("ctime: ");

0 commit comments

Comments
 (0)