How to change your server time

Written by admin on November 22, 2014. Posted in Basic Linux

Many voip applications require you to use server time for certain purposes. These include reminders, time conditions etc. In order to get correct timing your server needs to be synchronised to the correct local time. This article shows how you can achieve this in Linux.

Login to ssh and type the following commands:


# /etc/sysconfig/clock

Edit the file to look like the following and replace GMT with whatever time zone you want


For the time on the machine to reflect the change timezone we need to link the zoneinfo file to /etc/localtime. This can be done as follows :

If you are setting your timezone to "GMT" link the following file to /etc/localtime :
# ln -sf /usr/share/zoneinfo/Brazil/East /etc/localtime
Now by typing the date command to display the time you should see if reflect the newly linked timezone :
# date
Thu Sep 30 10:06:23 GMT 2014
If the time is still not correct but showing correct time zone then you will need to edit the time using 

# date 011923072014 

to change to 19 January 23:07  2014 for example