Setting the date, time and timezone

Expertise level: Easy

Follow these instructions to adjust the date, time and timezone settings on your server: 

  • Login with SSH as root.
  • Go to the  /usr/share/zoneinfo directory.
cd /usr/share/zoneinfo
  • Here you will find a list of time zone regions. Choose the most appropriate region (If you live in Montreal, Canada, it would be:  /usr/share/zoneinfo/America/Montreal).
  • Copy the actual timezone configuration file:
mv /etc/localtime /etc/localtime.bak
  • Create a symbolic link from the appropiate timezone to /etc/localtime:
ln -sf /usr/share/zoneinfo/America/Montreal /etc/localtime

If you need to manually change the date and time, please use this command:

date -s

MM: month

DD: day

hh: hour

mm: minutes

YY: year 

ss: seconds

For more information, you can consult this link:


Article is closed for comments.
Powered by Zendesk