Changing the time zone in CentOS

Friday, June 6, 2014


Here's how to change the time zone in CentOS. This should work on both CentOS 5 and 6.

First, determine the correct timezone. You can do this using tzselect (which just outputs some text and doesn't save anything), or by looking in /usr/share/zoneinfo for the right file. I'm on Pacific time, so for me it would be America/Los_Angeles.

Now, back up your existing time zone file:

# mv /etc/localtime /etc/localtime.bak

Then symlink the desired zoneinfo file to localtime:

# ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime

Now if you run date, the appropriate time zone should be displayed. There is one more step though. Open up the file /etc/sysconfig/clock and edit it to reflect the appropriate zone. For example:

ZONE="America/Los_Angeles"

Without this change, /etc/localtime will get overwritten and will revert to the previous time zone after yum or rpm updates tzdata.

Tags: linux | Posted at 08:53 | Comments (1)


Comments

cxddsfd on Tuesday, August 21, 2018 at 16:39

Sex small tits sucking nipples
video, anal porn, Teen Porn

Sex kleine Titten saugen Nippel
Video, analer Porno, Teen Porno

Sexe petits seins sucer les mamelons
video, porno anal, Teen Porn

Girls Boys 10_12_15_18_20 years
-
-
-
-
Download here: Site; http://smssexygirls.com
-
-
Download here: Site-2; http://xtl.jp/?7a
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

Sex small tits sucking nipples
video, anal porn, Teen Porn

Sex kleine Titten saugen Nippel
Video, analer Porno, Teen Porno

Sexe petits seins sucer les mamelons
video, porno anal, Teen Porn

Girls Boys 10_12_15_18_20 years
-
-
-
-
Download here: Site; http://smssexygirls.com
-
-
Download here: Site-2; http://xtl.jp/?7a
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

--

Add a comment

Name:
Email: (optional, not displayed to public)
URL:

Comment: