Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running a CentOS server and just cannot seem to set the time correctly. My problem is that I have set the timezone to UTC, and the server seems to acknowledge this but it still states the wrong time!

The real UTC time = 16:56 (My local timezone is GMT)

# hwclock –show
wed 09 Mar 10:56:48 AM UTC -0.502715 seconds

# date
Wed Mar 9 10:56:51 UTC 2011

I.e. the server seems to be saying that it IS in UTC time…but 6 hours behind!

I have taken several of steps to try to correct this including:

1. Use setup to manually pick the timezone
# system-config-date (Set to Etc/UTC)

2. Set the timezone in the localtime file
# ln -sf /usr/share/zoneinfo/UTC /etc/localtime

3. Change the UTC value in the /etc/sysconfig/clock file
I have tried both UTC=true and UTC=false

None of these solutions worked

Please help,

David

share|improve this question

2 Answers 2

up vote 3 down vote accepted

David,

You have set the timezone, now you just have to set the time. There are many ways to do this. I usually do:

ntpdate ntp.uiuc.edu

Or any other method on a quick google search for setting the time on CentOS.

Cheers, -danny

share|improve this answer

I hate to ask, but.. have you done anything to correct the time itself? Seems like the timezone is ok, but the time is off.

Have you set the time manually with the date command or synced to an NTP server?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.