mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 12:46:34 +00:00
Merge pull request #7202 from ascillato/patch-1
Allow to disable SNTP when using TIME <epoch>
This commit is contained in:
commit
beabe367f8
@ -460,7 +460,9 @@ void RtcSetTime(uint32_t epoch)
|
|||||||
if (epoch < START_VALID_TIME) { // 2016-01-01
|
if (epoch < START_VALID_TIME) { // 2016-01-01
|
||||||
Rtc.user_time_entry = false;
|
Rtc.user_time_entry = false;
|
||||||
ntp_force_sync = true;
|
ntp_force_sync = true;
|
||||||
|
sntp_init();
|
||||||
} else {
|
} else {
|
||||||
|
sntp_stop();
|
||||||
Rtc.user_time_entry = true;
|
Rtc.user_time_entry = true;
|
||||||
Rtc.utc_time = epoch -1; // Will be corrected by RtcSecond
|
Rtc.utc_time = epoch -1; // Will be corrected by RtcSecond
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user