12
# this doesn't seem to work properly
13
function setnettime0()
15
net time set $1 > /dev/null
20
if ! net time system $1 > /dev/null; then
23
t=`net time system $1`
27
echo "--------------------------------------------------------------------------------"
28
echo "SYNCHRONIZING CLOCKS WITH ${MYSERVER}"
29
echo "--------------------------------------------------------------------------------"
32
if [ "${MYSERVER}" != "" ]; then
33
serveropt="-S ${MYSERVER}"
35
echo "+synchronizing clocks"
36
if setnettime "${serveropt}" > /dev/null; then
37
nettime=`net time ${serveropt} | sed 's/\n//g'`
38
echo -n "net time is now: "
39
date -d "${nettime}" "+%Y-%m-%d %H:%M.%S"
42
echo -n "local time is now: "
43
date "+%Y-%m-%d %H:%M.%S"