Skip to content

Commit 650573b

Browse files
committed
esp32: Fix incorrect RTC log format in SystemTimeSupport
1 parent c81b3d4 commit 650573b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/platform/ESP32/SystemTimeSupport.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ CHIP_ERROR ClockImpl::SetClock_RealTime(Microseconds64 aNewCurTime)
9595
struct tm calendar;
9696
localtime_r(&timep, &calendar);
9797
ChipLogProgress(DeviceLayer, "Real time clock set to %lld (%04d/%02d/%02d %02d:%02d:%02d UTC)",
98-
static_cast<long long>(tv.tv_sec), calendar.tm_year, calendar.tm_mon, calendar.tm_mday, calendar.tm_hour,
99-
calendar.tm_min, calendar.tm_sec);
98+
static_cast<long long>(tv.tv_sec), calendar.tm_year + 1900, calendar.tm_mon + 1, calendar.tm_mday,
99+
calendar.tm_hour, calendar.tm_min, calendar.tm_sec);
100100
}
101101
#endif // CHIP_PROGRESS_LOGGING
102102
return CHIP_NO_ERROR;

0 commit comments

Comments
 (0)