Merge pull request #7202 from ascillato/patch-1

Allow to disable SNTP when using TIME <epoch>
This commit is contained in:
Theo Arends 2019-12-23 17:32:21 +01:00 committed by GitHub
commit beabe367f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -460,7 +460,9 @@ void RtcSetTime(uint32_t epoch)
if (epoch < START_VALID_TIME) { // 2016-01-01
Rtc.user_time_entry = false;
ntp_force_sync = true;
sntp_init();
} else {
sntp_stop();
Rtc.user_time_entry = true;
Rtc.utc_time = epoch -1; // Will be corrected by RtcSecond
}