Can't trust RTCs to tell the time. (#7779)

Further to https://github.com/meshtastic/firmware/pull/7772 ,
we discovered that some RTCs have hard-coded start times well in the
past.

This patch gives RTCs the same treatment as GPS - if the time is
earlier than BUILD_EPOCH, we don't use it.

Fixes #7771
Fixes #7750
This commit is contained in:
Tom Fifield
2025-08-30 04:22:23 +10:00
committed by Ben Meadors
parent 4e03df5ea7
commit 11db6d4dcc
2 changed files with 23 additions and 5 deletions

View File

@@ -48,7 +48,7 @@ uint32_t getTime(bool local = false);
/// Return time since 1970 in secs. If quality is RTCQualityNone return zero
uint32_t getValidTime(RTCQuality minQuality, bool local = false);
void readFromRTC();
RTCSetResult readFromRTC();
time_t gm_mktime(struct tm *tm);