Install ntpd

apt-get update && apt-get -y install ntp
apt-get purge ntpdate
vi /etc/default/ntp
NTPD_OPTS='-g'

adjust time

sntp -s ts1.univie.ac.at

restart ntpd

service ntp restart
tail -f /var/log/syslog | grep ntpd

configure local timeserver

vi /etc/ntp.conf

interface ignore wildcard
interface listen 192.168.0.10

# Specify one or more NTP servers.
server ts1.univie.ac.at iburst
server ts2.univie.ac.at iburst

# Allow LAN machines to synchronize with this ntp server
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

server 127.127.1.0
fudge 127.127.1.0 stratum 10
service ntp restart
netstat -tulpa | grep ntp

Enable network time synchronization

timedatectl set-ntp true
timedatectl
Local time: Wed 2018-08-22 01:04:48 CEST
Universal time: Tue 2018-08-21 23:04:48 UTC
RTC time: n/a
Time zone: Europe/Vienna (CEST, +0200)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2018-03-25 01:59:59 CET
Sun 2018-03-25 03:00:00 CEST
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2018-10-28 02:59:59 CEST
Sun 2018-10-28 02:00:00 CET