[PLUG] ntp link

Elliott Mitchell ehem at m5p.com
Tue Jan 17 01:03:18 UTC 2006


>From: Bruce Kilpatrick <bakilpatrick at verizon.net>
> If I set my clock preferences to UTC, which is the only other choice I
> have at this time, I am showing about 16 hours ago (i.e.  Noon today
> shows 8pm yesterday.
> Did I miss something?

Hmm, I'm guessing wildly that your timezone isn't set, and your hardware
clock may or may not be set right. Does this system ever run any other
OS? Do you care what that OS's view of the clock looks like?

First step, as root run `tzconfig`. This is simply a front-end to adjust
the /etc/localtime symbolic link as appropriate.

Next step, use `date` to set the system clock (the kernel's view of the
clock, not the actual battery-backed up hardware clock). This gets
filtered through the timezone setting, so this has to be done second.

Final step, use `hwclock` to adjust the hardware clock if needed, and
then set the system to restore it correctly. I'm unsure whether the
location is universal, but on Debian /etc/default/rcS has the variable
"UTC" that controls whether your hardware clock gets set to UTC versus
local time. If you only ever run Linux on your system, you definitely
want to set that to "yes", as the timezone adjusts what every program
displays and you don't have to deal with modifying the hardware clock.

NTP servers will typically give you more precise time, which is why the
default is to have `hwclock` store the adjusted time to the hardware
clock on shutdown.


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         EHeM at gremlin.m5p.com PGP 8881EF59         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
    \___\_|_/82 04 A1 3C C7 B1 37 2A*E3 6E 84 DA 97 4C 40 E6\_|_/___/





More information about the PLUG mailing list