Setup datetime in linux from command line

To automaticaly configure datetime on a debian server, you'll need NTP server installed.

sudo apt-get install ntp

Reconfigure timezone

sudo dpkg-reconfigure tzdata