Server displays wrong UTC time

11,318

Solution 1

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

Solution 2

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:
11,318

Related videos on Youtube

david
Author by

david

Updated on September 17, 2022

Comments

  • david
    david over 1 year

    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