set boottime for RTC (if rtc is set)

This commit is contained in:
MichaelDvP
2026-08-10 10:11:43 +02:00
parent 52486ed5b4
commit 1d9a0b6257
+1 -1
View File
@@ -853,7 +853,7 @@ void System::send_info_mqtt() {
// if NTP is enabled send the boot_time in local time in ISO 8601 format (eg: 2022-11-15 20:46:38)
// https://github.com/emsesp/EMS-ESP32/issues/751
if (ntp_connected_) {
if (time(nullptr) > 1500000000L) {
char time_string[25];
time_t now = time(nullptr) - uuid::get_uptime_sec();
strftime(time_string, 25, "%FT%T%z", localtime(&now));