diff --git a/emhttp/plugins/dynamix/include/DashboardApps.php b/emhttp/plugins/dynamix/include/DashboardApps.php index 8e5ac6e72..0de3588ba 100644 --- a/emhttp/plugins/dynamix/include/DashboardApps.php +++ b/emhttp/plugins/dynamix/include/DashboardApps.php @@ -21,8 +21,8 @@ require_once "$docroot/plugins/dynamix.docker.manager/include/DockerClient.php"; require_once "$docroot/plugins/dynamix.vm.manager/include/libvirt_helpers.php"; if (isset($_POST['ntp'])) { - $ntp = exec("ntpq -pn|awk '{if (NR>3 && $1~/^[*+]/) c++} END {print c}'"); - die($ntp ? sprintf(_('Clock synchronized with %s NTP server'.($ntp==1?'':'s')),$ntp) : _('Clock is unsynchronized with no NTP servers')); + $ntp = exec("ntpq -pn|awk '$1~/^\*/{print $9;exit}'"); + die($ntp ? sprintf(_('Clock is synchronized using NTP, time offset: %s ms'),abs($ntp)) : _('Clock is unsynchronized with no NTP servers')); } if ($_POST['docker']) {