I've hosed my clock setup
Kevin O'Gorman
kevin
Mon May 17 11:51:26 PDT 2004
On Sat, 23 Aug 2003, Kurt Wall wrote:
> Quoth Kevin O'Gorman:
> > I don't know what I did the last time I went to adjust my machine's
> > clock, but it seems Linux no longer talks nice to the hardware clock.
> > Every time I boot, the clock is off by 7 hours, and for my setup
> > thats usually once a day (no fault of Linux, I just have to shut this
> > off at night).
> >
> > The system is RH 7.3, and the contents of /etc/sysconfig/clock are
> >
> > ZONE="America/Los_Angeles"
> > UTC=false
> > ARC=false
>
> Do you have an /etc/localtime file? If so, it probably is a symlink
> to the actual timezone file.
I do, and it points to /usr/share/zoneinfo/America/LosAngeles, just
like it should.
>
> > I keep the hardware clock in local time because I dual-boot to other
> > OS-es once in a while. Here's what it looks like:
>
> Okay. It seems like you should be able to rerun the timezone
> configuration portion of setup and make sure that everything is
> copacetic.
I've tried some things that may be what you're talking about to no
avail. Perhaps if you were more (i.e. very very) specific I could
say if I've done that.
>
> > [root at treat rc.d]# /sbin/hwclock -r
> > Fri 15 Aug 2003 07:53:56 AM PDT 0.849306 seconds
> > [root at treat rc.d]# /sbin/hwclock -r --localtime
> > Fri 15 Aug 2003 07:54:12 AM PDT 0.268908 seconds
> > [root at treat rc.d]# /sbin/hwclock -r --utc
> > Fri 15 Aug 2003 12:54:18 AM PDT 0.280746 seconds
> > [root at treat rc.d]#
>
> hwclock --hctosys (or hwclock -s) should sync the system time
> to the the hardware clock.
Yes, provided I also use --localtime. That's what worked, but
placement of the command is a hack the way I did it. I put it in
the start() function of /etc/rc.d/init.d/syslog, and it does not
belong there with an unconditional --localtime.
>
> > However, on each reboot KDE's clock in the panel, and the 'date'
> > program both report time as if I used UTC; in the above example
> > that was 12:54 AM.
> >
> > I'm baffled and sleepless in California.....
>
> Presumably, nptdate (deprecated for "ntpd -q", it appears) should be
> able to set your hardware clock to the "right" time so long as you have
> an NTP server setup in /etc/ntp.conf.
I do not have NTP working on this machine. And I'm not complaining about
the HW clock; it's close enough, and I can adjust it to my Wave clock
(Naval Observatory time, I think) every so often. Eventually I'll set
up NTP, but frankly I want to get this nailed first.
>
> Kurt
>
More information about the Linux-users
mailing list