Tuesday, June 29, 2010

Setup time zone in Linux


1. The command used to check the time zone is

[root@server123 ~]# date
MON Jan 14 14:04:01 IST 2010
Here we can see that time zone is set into Indian Standard time.

2.Take the backup of current timezone configuration.

[root@server123 ~]#mv /etc/localtime /etc/localtime-old

2. Change to the directory to /usr/share/zoneinfo. You can find all the time zone regions here. Choose the the appropriate region where you resides. If you live in India choose region kerala in the /usr/share/zoneinfo/Asia directory.

3)remove the file /etc/localtime

[root@server123 Asia]# rm /etc/localtime


4. Create a symbolic link from the appropiate timezone to /etc/localtime

[root@server123 Asia]# ln -s /usr/share/zoneinfo/Asia/Kerala /etc/localtime


5. Update the current system time by executingthe rdate command.

[root@server123 Asia]#rdate -s rdate.cpanel.net

6. Synchronize hardware clock with system clock .

[root@server123 Asia]# /sbin/hwclock – -systohc

Tags:-Time zone,linuz time zone,Linux commands,Linux time commands,linux time zone commands,Linux,cPanel,Time