aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--global-functions13
1 files changed, 10 insertions, 3 deletions
diff --git a/global-functions b/global-functions
index 145ec09..d18a859 100644
--- a/global-functions
+++ b/global-functions
@@ -640,9 +640,16 @@
# check if system time is sync
:set TimeIsSync do={
- :if ([ / system ntp client get enabled ] = true && \
- [ / system ntp client get status ] = "synchronized") do={
- :return true;
+ :if ([ / system ntp client get enabled ] = true) do={
+ :do {
+ :if ([ / system ntp client get status ] = "synchronized") do={
+ :return true;
+ }
+ } on-error={
+ :if ([ :typeof [ / system ntp client get last-adjustment ] ] = "time") do={
+ :return true;
+ }
+ }
}
:if ([ / ip cloud get update-time ] = true && \