to sync your computer’s time with preconfigured timeserver go:

# on old debian
ntpdate && hwclock -w; # get time from servers and update hardware clock

# on new debian (very confusing for me as well)
ntpd -q -g; # update time from server
hwclock --systohc; # sync hardware clock

check if your timezone is correct:

cat /etc/timezone

if not go:

dpkg-reconfigure tzdata

install and config ntp internet time sync:

apt-get update; # update software package list
apt-get install ntp ntpdate; # install tools to update the time from timeservers

# edit network time protocol config
vim /etc/ntp.conf

# add those if you are in Germany (de)
# if you are in China use (cn)
# check out: http://www.pool.ntp.org/en/ for more servers
server 0.de.pool.ntp.org
server 1.de.pool.ntp.org
server 2.de.pool.ntp.org
server 3.de.pool.ntp.org

# on old debian
ntpdate && hwclock -w; # get time from servers and update hardware clock

# on new debian (very confusing for me as well)
ntpd -q -g; # update time from server
hwclock --systohc; # sync hardware clock

you know should have an accurate clock

which you can check via:

alias datum="date '+DATE: %Y-%m-%d TIME: %H:%M:%S'"; # set an bash-alias, you can put it at the end of /etc/bash.bashrc
datum; # should give you:
DATE: 2015-06-19 TIME: 10:36:06; # IF THIS TIME IS STILL NOT CORRECT! YOU HAVE SET THE WRONG TIME-ZONE ;)
dpkg-reconfigure tzdata; # reconfigure timezone

Current default time zone: 'Europe/Berlin'
Local time is now:      Fri Jun 19 16:37:45 CEST 2015.
Universal Time is now:  Fri Jun 19 14:37:45 UTC 2015.

datum; # now displays the correct time
DATE: 2015-06-19 TIME: 16:37:48

while true ; do datum ; sleep 1 ; done # display the current date and time every second, run this to compare time between two systemsLinks:

http://wiki.hetzner.de/index.php/Uhrzeit_synchronisieren_mit_NTP/en

http://www.pool.ntp.org/en/use.html

admin