Re: hardware clock and utc
Message: 1 Date: Fri, 18 Sep 2009 14:04:59 +0300 From: Vasylchyshyn Nikolay <younghead@ukr.net> Subject: hardware clock and utc, etc... To: crux@lists.crux.nu Message-ID: <20090918110459.GA24356@VasylchyshynNI.192.168.2.1> Content-Type: text/plain; charset=us-ascii
Hello guys.
I have some problem. How can i set my RTC to UTC?
in rc.conf: TIMEZONE=Europe/Kiev
The problem is actually in the fact, that when i do # hwclock --utc --systohc, then RTC is setups in localtime minus 3 hours. But when i do hwclock --utc --hctosys, then my sys time is the same as in RTC.
How can i configure my RTC to UTC and have correct localtime? (I know about /etc/adjtime and rc:79 hwclock --hctosys and rc.shutdown:37 hwclock --systohc)
If i setup my RTC to 10:00:00 (say, from BIOS). And the last line of /etc/adjtime is UTC, then when i boot up CRUX, i have localtime set to 10:00:00, but when i do shutdown, then my RTC sets to 7:00:00. (... then bootup - 7:00:00, shutdown - 4:00:00) So, i get 3 hours time shift... How can I avoid this?
And how cat I properly set my RTC to UTC?
PS: I have CRUX-2.5 and util-linux-ng-2.16.1
Thanks for your attension, time and ansvers. And sorry me for my horrible english.
First you need to realise that if your hardware clock is set to UTC, then when you show the time with "hwclock --show", you aren't actually seeing the real time on the clock. hwclock adjusts the displayed time to local using your timezone information. That's why the hardware clock seems to show the same time as the system clock; it's actually three hours earlier than that. To see the real time on the hardware clock, use the --debug option with --show. You will probably find that it isn't set to the time you thought it was! Use the BIOS to reset it to three hours before your local time and, with the adjtime file you have, it should work out right. That worked for me when I had the identical problem. ------------------------------ Hazel Russman <hazel_russman@yahoo.co.uk>
participants (1)
-
Hazel Russman