mirror of
https://github.com/esphome/esphome.git
synced 2026-10-03 09:46:03 +00:00
bot review
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <cerrno>
|
||||
|
||||
#include <cinttypes>
|
||||
#include <cstdlib>
|
||||
|
||||
namespace esphome::time {
|
||||
|
||||
@@ -31,10 +31,11 @@ void RealTimeClock::dump_config() {
|
||||
ESP_LOGCONFIG(TAG, "Timezone: UTC%+d:%02d", std_hours, std_mins);
|
||||
if (tz.has_dst) {
|
||||
int dst_hours = -tz.dst_offset_seconds / 3600;
|
||||
int dst_mins = abs(tz.dst_offset_seconds % 3600) / 60;
|
||||
// Always use M format - tzdata and aioesphomeapi only generate M format rules
|
||||
ESP_LOGCONFIG(TAG, " DST: UTC%+d, M%d.%d.%d/%" PRId32 " - M%d.%d.%d/%" PRId32, dst_hours, 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/%" 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);
|
||||
}
|
||||
#endif
|
||||
auto time = this->now();
|
||||
|
||||
Reference in New Issue
Block a user