Wednesday, 3 July 2013

TO CHANGE TIME ZONE IN LINUX

How to change Date, Time , Zone on linux server?


# date
Tue May 11 22:27:44 CET 2010

Set Date:
Use the following syntax to set new data and time:


Refer the below example :-

#date -s “23 June 2013 18:00:00″

Set Time:

To set time use the following syntax:

# date +%T -s “05:10:15″
Where,
* 05: Hour (hh)
* 10: Minute (mm)
* 15: Second (ss)

To change timezone

The file /etc /localtime, is copy of a file which has details about your time zone. The Zone information file is located at /usr/share/zoneinfo and this depends on your distribution.


#cd /etc/
#ln -sf /usr/share/zoneinfo/EST localtime



If you wish to set up  to IST (Asia/Calcutta):

#ln -sf /usr/share/zoneinfo/Asia/Calcutta localtime

No comments:

Post a Comment