Removed Ethernet, added default WiFi (mikrotik AP) and fixed various Clock bugs.
This commit is contained in:
@@ -524,14 +524,14 @@ void CommandHandler::handleSetRtcTimeCommand(JsonVariant contents, const Message
|
||||
|
||||
// Verify the time was set correctly by reading it back
|
||||
unsigned long verifyTime = _timeKeeper->getTime();
|
||||
if (verifyTime > 0 && abs((long)verifyTime - (long)timestamp) < 5) { // Allow 5 second tolerance
|
||||
if (verifyTime > 0 && abs((long)verifyTime - (long)localTimestamp) < 5) { // Allow 5 second tolerance
|
||||
sendSuccessResponse("set_rtc_time",
|
||||
"RTC time and timezone updated successfully", context);
|
||||
LOG_INFO("RTC time set with timezone: UTC %lu + %ld = local %lu",
|
||||
timestamp, totalOffset, localTimestamp);
|
||||
} else {
|
||||
sendErrorResponse("set_rtc_time", "Failed to verify RTC time was set correctly", context);
|
||||
LOG_ERROR("RTC time verification failed - expected: %lu, got: %lu", timestamp, verifyTime);
|
||||
LOG_ERROR("RTC time verification failed - expected: %lu, got: %lu", localTimestamp, verifyTime);
|
||||
}
|
||||
} else {
|
||||
// Legacy method: Use device's existing timezone config
|
||||
|
||||
Reference in New Issue
Block a user