There seems to be some confusion here.  Those of you that know all this
can ignore this message.  :)

The BIOS clock has no concept of time zone or UTC (or of daylight
savings time).  It is a clock like the analog clock hanging on the wall.
  Whether it is set to local time or to UTC is up to the sysadmin.

When RHEL boots, it reads the time from the BIOS clock and sets its own
internal system clock from the BIOS clock time.  The way it interprets
the time from the BIOS clock is determined by the settings in the
/etc/sysconfig/clock file.  In the original posting it says that
/etc/sysconfig/clock contains the line "UTC=true" so the system is going
to assume that the BIOS clock is set to UTC, i.e 5 hours ahead of the
ZONE="America/Toronto".

So, it sounds like the original problem was that the BIOS clock was set
to local time but RHEL was told that it was set to UTC.

The reason the command below (setting the date and then rebooting)
worked is because when the server shuts down normally, it updates the
BIOS clock from the system clock, which with these settings would have
resulted in the BIOS clock being changed by 5 hours and is therefore now
set to UTC time.

In summary, if the /etc/sysconfig/clock file says "UTC=true" the BIOS
clock must be set to UTC time, i.e. 5 hours ahead of the current EST
time.  The BIOS clock has no concept UTC or local time so the admin
would have to set it correctly manually or by the process below.

The advantage of setting your BIOS clock to UTC is that you no longer
have to worry about updating it after daylight savings changes occur.
That is a problem if your BIOS clock is set localtime and your computer
boots before the daylight savings switch and then crashes after the
daylight savings switch without having a chance to update the BIOS clock
to reflect the one hour change.  In that case when your computer
reboots, it will assume the BIOS clock is correct and it will be one
hour out when it comes up.  Using UTC eliminates that problem because
UTC clocks do not change for daylight savings.

Hope this helps someone!

Kelwin Wylie

On 12/02/2009 12:57 PM, Win Htin wrote:
> The BIOS setup doesn't provide any option to set the clock to UTC
> hence I ran the command :
>             date -s "2 DEC 2009 HH:MM:SS"
> and then rebooted the server. Seems it is fixed since it came back up
> with the correct time. Thanks for the various suggestions.
> 
> Cheers,
> Win


> 
>> -----Original Message-----
>> From: [email protected] [mailto:[email protected]] 
>> On Behalf Of Win Htin
>> Sent: Tuesday, December 01, 2009 3:39 PM
>> To: [email protected]
>> Subject: [rhelv5-list] Date shows time is 5hrs behind EST
>>
>> Hi folks,
>>
>> I have a new RHEL 5.4 server which is 5 hrs behind Eastern Standard
>> Time. following is what I have done and nothing seems to fix the
>> problem.
>>
>> 1. Set time and date from BIOS setup and rebooted the server.
>> 2. cat /etc/sysconfig/clock
>>         ZONE="America/Toronto"
>>         UTC=true
>>         ARC=false
>> 3. The ntp.conf file and ntpservers files were copied from another
>> server which is exactly the same hardware-wise. That other server has
>> the correct time/date.
>> 4. a)  cd /usr/share/zoneinfo/Canada
>>    b)  cp -p Pacific /etc/localtime;
>>    c)  date;
>>         Tue Dec  1 07:29:11 PST 2009   <== the time changed BUT 5 hrs
>> behind actual clock
>>     e) cp -p Eastern /etc/localtime;
>>     f)  date;
>>         Tue Dec  1 10:30:15 EST 2009  <== the time changed
>>         BUT 5 hrs behind actual current time from another server
>> which is showing
>>         Tue Dec  1 15:31:23 EST 2009
>>
>> Any idea what is causing the clock to be 5 hrs behind? TIA for your help.
>>
> ---------------------------
>> Message: 3
>> Date: Tue, 1 Dec 2009 13:42:28 -0800
>> From: "Collins, Kevin [BEELINE]" <[email protected]>
>> Subject: RE: [rhelv5-list] Date shows time is 5hrs behind EST
>> To: "Red Hat Enterprise Linux 5 (Tikanga) discussion mailing-list"
>>        <[email protected]>
>>
>> Or setting the BIOS clock to UTC... :)
>>
>> Kevin
>>
>> -----Original Message-----
>> From: [email protected]
>> [mailto:[email protected]] On Behalf Of Glaser, David
>> Sent: Tuesday, December 01, 2009 12:42 PM
>> To: Red Hat Enterprise Linux 5 (Tikanga) discussion mailing-list
>> Subject: RE: [rhelv5-list] Date shows time is 5hrs behind EST
>>
>> I believe you want to set UTC=false in /etc/sysconfig/clock. Setting UTC
>> to true means that you are using UTC based clock which is five hours
>> ahead of EST.
>>
>> Dave


_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to