From 57937c5ccc0f06432aefcce32759b63d3edef2cb Mon Sep 17 00:00:00 2001 From: stm32repo <38454920+stm32repo@users.noreply.github.com> Date: Fri, 25 Sep 2026 12:04:40 +0000 Subject: [PATCH] Fix NTP time detection on OpenWrt Portduino (#11919) * Fix NTP time detection on OpenWrt Portduino * chore: trunk fmt --------- Co-authored-by: stm32repo Co-authored-by: Ben Meadors --- src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 1c444c33dc..d9f4818776 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -447,6 +447,9 @@ void setup() std::string timeCommandResult = exec("timedatectl status | grep synchronized | grep yes -c"); if (timeCommandResult[0] == '1') { ourQuality = RTCQualityNTP; + } else if (access("/var/state/dnsmasqsec", F_OK) == 0) { + // OpenWrt marks the system time as valid after successful NTP synchronization. + ourQuality = RTCQualityNTP; } #endif