![]() ![]() ![]() |
![]() |
![]() ![]() |
There is no guarantee that your questions here will ever be answered. Readers at confidential sites must provide permission to publish. However, you can be published anonymously - just let us know!
From tony
Answered By Thomas Adam, Ben Okopnik, Mike Orr, Mike Ellis
I cant't seem to work this one out!!!! On my RedHat 6.1 Linux box, my system time is set to local time and hardware clock is set to UTC. These times appear to be OK.
[Ben] Why not set both to local time? This is one of the things that I idly fiddle with occasionally, and have not seen any bad effects from either method. Yes, the One True Unix Way is for the hardware clock to be set to UTC... but I don't pay it much mind, especially when it gets in my way.
Besides, if you've got a dual-boot system, poor lil' Windows gets all confused about UTC anyway.
Whenever I save a file, then do an ls -l, the file time shows UTC.
Everything else, logs, etc. show local time. I am running ntpd, and this keeps the hardware clock OK.
[Ben] Just remember to run
hwclock --adjust
once in a while. That way, after a couple of months, you can even turn off "ntpd" - and your system will keep perfect time (I think that a max deviation of one second in two or three months can be considered "perfect".) See the discussion in the "hwclock" manpage, and read about "/etc/adjtime".
I have a link from /etc/localtime to /usr/share/zoneinfo.
I have looked up numerous web sites about the clock system, but none have helped me. Any pointers in the right direction would be appreciated.
Thanks, Tony Ellem
[Thomas]
Have you tried reading the clock-howto from the LDP <www.linuxdocs.org>???
What happens if you type in the following (as root):
hwclock -W
[Ben] Baldur:~# hwclock -W unrecognized option `-W'
The short options for "hwclock" are "-[rwsavuD]", and the odd "-[AJSF]" for DEC Alphas. What is it that you were trying to do? "hwclock -D" (debug), maybe? I'm afraid that wouldn't be of much use: what the querent needs is a usage methodology rather than a fix for something that's broken.
[Chris G.]
Hi Ben,
This is not a challenge, but an observation that I have made. I used to
set my real time clock to local time, but for some reason, the daylight
savings time adjustment did not automatically occur.
I had to set my real time clock to UTC for things to work properly. I use the SuSE 6.4 distribution (2.2.14 kernel), and maybe there exists some sort of constraint with my distribution -- I don't know. Did you ever hear this crazy story before?
Regards, Chris Gianakopoulos
[Ben] Actually, I'm not sure by what mechanism that _is_ supposed to happen automatically - it never did for me whether I was using UTC or local. I just gave up and put it in 'cron'.
![]()
[Chris]
Hmmm. That makes sense (the cron job).
[Mike Orr] It's supposed to be encoded in the timezone entry. It seems to be a hit or miss thing whether it actually adjusts on the right day-- sometimes it does, sometimes it doesn't.
BTW, daylight savings time does not apply to UTC. UTC is always sun time. But the Pacific time zone is always the same distance behind UK time, because UK time does move with daylight savings time.
When I was in Russia in 95 or 96, it was right when Russia was changing from the Soviet schedule for daylight savings to the western schedule. The Soviet schedule was a few weeks earlier, because it was early October when it happened.
Let's take a poll Monday and see how many clocks went back and how many didn't...
...............
P.S. My FreeBSD machine did work all right.
My other machine, running Mandrake 8.0 - with hardware clock set to local time - did not adjust though... Oh well, just meant I had to help the computer a bit...
RH7.1 24x7 RH7.1 dual-boot RH7.0 24x7 RH7.2 laptop (my Solaris 8 box did OK as well, but somehow that seems less relevant...)
P.S. 01:00 doesn't exist on March 31st 2002 as the clocks roll from 00:59:59 to 02:00:00 when "summer time" begins again - roll on March 31st!
Thanks!
<Rod Serling voice> The Twilight Zone. </RSv> Is that what your 'top _switched_ to as a result of Daylight Wasting Time, or is that just what your date happens to be set to randomly? And what does your "hwclock" say? All sorts of odd things can happen with clock settings... pardon me, will happen with clock settings if "/etc/adjtime" is messed up. Read the "hwclock" man page (this usually leads, in one easy step, to deleting "/etc/adjtime" and re-running "hwclock --set ...", etc.)
(changing the appropriate values).
Hmm. That might contribute to the problem. The only time you want to actually use "hwclock" to set the time is a) initially, and b) when you figure it's been long enough that the correction factor (1 second per <interval> In fact, here's a nifty little script that does this for me: See attached zaptime.pl.txt
............... |
![]() ![]() ![]() |
![]() |
![]() ![]() |