From ed7b48061a72011f43bf862c8036a0294d7a7eb2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 21 Jul 2022 13:22:58 +0200 Subject: global-functions: $IsTimeSync: drop old code In RouterOS 7.x the ntp client and server are bundled and unique and can not be unavailable. Also it does no longer have a 'last-adjustment' property... --- global-functions | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/global-functions b/global-functions index 1acf11f..6f1a6c5 100644 --- a/global-functions +++ b/global-functions @@ -484,14 +484,8 @@ :global LogPrintExit2; :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 ([ /system/ntp/client/get status ] = "synchronized") do={ + :return true; } :return false; } -- cgit v1.2.3-54-g00ecf