Re: Time Setting...

From: young_child (abc_at_abc.com)
Date: 01/31/04


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
>



Relevant Pages

  • Re: Coding style, wait statement, sensitivity list and synthesis.
    ... >> least assume that XST supports this style and create this hardware. ... >>>then the higher precedence clock must be coded first. ... For these very rare dual-edge sensitive register, yes, I think instantiation ... Dual-edge sensitive register elements is not common practice in hardware design. ...
    (comp.lang.vhdl)
  • Re: [PATCH 06/23 -v8] handle accurate time keeping over long delays
    ... which is the same as the underlying hardware counter. ... So you are saying that you can trivally make it work with a clock that is, ... will never change while I am in the preempt disabled code. ... it's called from an IPI running on each CPU. ...
    (Linux-Kernel)
  • Re: [opensuse] Time Incorrect in New Installed opensuse 11.1
    ... you're given the choice of setting your hardware ... clock to UTC or local time. ... UTC, but actually use local time, your clock will be off by the ...
    (SuSE)
  • Re: Using different timebase for ntpd
    ... modified Ethernet devices to support hardware time stamping. ... was doing hardware gated ntp packets in the 90s. ... hardware timestamping is available from us. ... software timestamping using a hardware clock. ...
    (comp.protocols.time.ntp)
  • Re: Coding style, wait statement, sensitivity list and synthesis.
    ... Or they decided collectively not to implement the double-edge hardware feature to was that 1076.6 recommended it. ... there is a standard for coding styles? ... modeling the IBM style separate master-slave register hardware, which also allowed some pretty exotic scan/functional clock designs. ... In a design review, I require all multiple clock and clock ...
    (comp.lang.vhdl)