Re: Time Setting...
From: young_child (abc_at_abc.com)
Date: 01/31/04
- Next message: Harry Phillips: "Re: Linux Environment"
- Previous message: marblespurs: "Cannot use xcin to input chinese"
- In reply to: Robert Hull: "Re: Time Setting..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 31 Jan 2004 11:15:10 +0800
Robert Hull wrote:
>
>> Robert Hull wrote:
>>
>>> Have you actually tried the suggestion to declare that your hardware
>>> clock is on local time ?
>>
>>
>> I have tried hwclock --hctosys --localtime. It sets the hardware clock
>> to be the system time correctly. I use hwclock to view the hardware
>> clock time and the time is correct. But when I reboot my RH9.0,
>> hardware clock is correct, but system clock time is 8 hours ahead.
>
>
> So you have not changed the config files, have you ?
I have examined the file /etc/rc.sysinit. I found that it will do the
followings:
/sbin/hwclock --localtime --hctosys
And I found that what it echoed out after the command is:
Setting clock (localtime): date <the local time> UTC.
When I examined the script again, this is done by:
action $"Setting clock $CLOCKDEF: 'date'" date
So, my interpretation is: as the command "date" run in boot up time
shows a UTC time, (when I type `date` in terminal, it shows <the local
time> HKG), the system don't know my timezone is HKG when it boots up.
As a result, the system clock is set to hardware clock (which is the
correct local time) during bootup, and after bootup, the system knows
the timezone, and adds 8 hours to the system clock again...
Do you think my interpretation is reasonable? (Or it won't happen...?)
But how can I change the situation?
Thanks for your comments again.
>
>>
>>> Alternatively, have you tried putting the hardware clock onto UTC as
>>> someone else suggested ?
>>>
>>
>> I have tried this some time ago. However, I am using Windows as
>> another OS. It will recognize the hardware clock as localtime. I would
>> like to set the hardware clock to localtime instead...
>>
> Then set the config files accordingly - I'm not sure which one in RH9 -
> grep for UTC or for localtime
>
- Next message: Harry Phillips: "Re: Linux Environment"
- Previous message: marblespurs: "Cannot use xcin to input chinese"
- In reply to: Robert Hull: "Re: Time Setting..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|