4

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

david
  • 43
  • 1
  • 1
  • 3

2 Answers2

6

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

dannyman
  • 358
  • 4
  • 15
1

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?

Shane Madden
  • 112,982
  • 12
  • 174
  • 248