1
0
mirror of https://github.com/esphome/esphome.git synced 2026-02-08 00:31:58 +00:00
This commit is contained in:
J. Nick Koston
2026-01-30 01:28:23 -06:00
parent 19e9ab253e
commit a1eef9870c

View File

@@ -111,9 +111,8 @@ void RealTimeClock::synchronize_epoch_(uint32_t epoch) {
void RealTimeClock::apply_timezone_(const char *tz) {
ParsedTimezone parsed{};
// Handle null input
if (tz == nullptr) {
ESP_LOGW(TAG, "Failed to parse timezone: (null)");
// Handle null or empty input - use UTC
if (tz == nullptr || *tz == '\0') {
set_global_tz(parsed);
return;
}