I got problem to sync time on my Linux controllers using ntpdate because they are under proxies & firewall. I found a simple solution and it's using google web server time.
Execute this
sudo date -s "$(wget -S "http://www.google.com/" 2>&1 | grep -E '^[[:space:]]*[dD]ate:' | sed 's/^[[:space:]]*[dD]ate:[[:space:]]*//' | head -1l | awk '{print $1, $3, $2, $5 ,"GMT", $4 }' | sed 's/,//')"
if the timezone is not configured yet, simply run this commandln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtimeor using wizard
dpkg-reconfigure tzdata
0 comments:
Post a Comment