Please help me,
How to modify default date and time zones for CentOS server?
Thanks
Date and time change in server
-
- Posts: 5
- Joined: Wed Jan 21, 2015 4:14 pm
Re: Date and time change in server
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
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
-
- Posts: 7
- Joined: Wed Jan 21, 2015 4:11 pm
Re: Date and time change in server
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
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