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-29 13:22:23 -05:00
committed by GitHub
co-authored by GitHub
parent 9b41131af8
commit 10c6836263
2 changed files with 23 additions and 5 deletions
+1 -1
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);