Page 1 of 1
Date and time change in server
Posted: Thu May 14, 2015 9:31 am
by babitaacharya644
Please help me,
How to modify default date and time zones for CentOS server?
Thanks
Re: Date and time change in server
Posted: Fri May 15, 2015 9:53 am
by archangevictoria
Hello
This command will help you out
Type the following commands as root:
cp /etc/localtime /root/old.timezone
rm /etc/localtime
ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
Re: Date and time change in server
Posted: Wed May 20, 2015 10:30 am
by laurencecatherine741
To show the current timezone in the file /etc/timezone, use the command:
cat /etc/timezone
To change this to the U.S. Los Angeles time, we need to modify the /etc/timezone file.
First step: edit the /etc/timezone file via vim or nano.
Vi editor:
vi /etc/timezone
Nano editor:
nano /etc/timezone
Second step: modify the file as shown below:
America/Los_Angeles
set the timezone from the terminal using the TZ variable.
export TZ=America/Los_Angeles