From a757cb3c910a219127cf8863bff2d25893f0087a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 30 Jan 2026 00:03:28 -0600 Subject: [PATCH] bot review --- esphome/components/time/real_time_clock.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/esphome/components/time/real_time_clock.cpp b/esphome/components/time/real_time_clock.cpp index b99c5df125..0a5ff63481 100644 --- a/esphome/components/time/real_time_clock.cpp +++ b/esphome/components/time/real_time_clock.cpp @@ -32,10 +32,15 @@ void RealTimeClock::dump_config() { if (tz.has_dst) { int dst_hours = -tz.dst_offset_seconds / 3600; int dst_mins = std::abs(tz.dst_offset_seconds % 3600) / 60; + // Transition times (when DST starts/ends) + int start_time_hours = tz.dst_start.time_seconds / 3600; + int start_time_mins = std::abs(tz.dst_start.time_seconds % 3600) / 60; + int end_time_hours = tz.dst_end.time_seconds / 3600; + int end_time_mins = std::abs(tz.dst_end.time_seconds % 3600) / 60; // Always use M format - tzdata and aioesphomeapi only generate M format rules - ESP_LOGCONFIG(TAG, " DST: UTC%+d:%02d, M%d.%d.%d/%" PRId32 " - M%d.%d.%d/%" PRId32, dst_hours, dst_mins, - tz.dst_start.month, tz.dst_start.week, tz.dst_start.day_of_week, tz.dst_start.time_seconds / 3600, - tz.dst_end.month, tz.dst_end.week, tz.dst_end.day_of_week, tz.dst_end.time_seconds / 3600); + ESP_LOGCONFIG(TAG, " DST: UTC%+d:%02d, M%d.%d.%d/%d:%02d - M%d.%d.%d/%d:%02d", dst_hours, dst_mins, + tz.dst_start.month, tz.dst_start.week, tz.dst_start.day_of_week, start_time_hours, start_time_mins, + tz.dst_end.month, tz.dst_end.week, tz.dst_end.day_of_week, end_time_hours, end_time_mins); } #endif auto time = this->now();