[lug] Time zone grumbling

Nate Duehr nate at natetech.com
Fri Mar 31 01:12:38 MST 2006

Daniel Webb wrote:
> I'm not sure if my problems right now are a symptom of Debian or the Linux
> world in general, but I've been using Linux for 7 years now and I have yet to
> see a sensible and consitent description and/or implementation of time on
> Linux.  For example, I chose (unwisely) the "use UTC" option when I installed
> a new Debian.  Now the "UTC" time gives the local time and the "local" time
> gives UTC-7.  So I should be able to change that, right?


All of the responses were great so far, I was just going to add a couple 
I've run across from the more "operational" standpoint.

After getting all the various symlinks and junk mentioned already, set 

hwclock --utc
hwclock --set --utc <blah>

Is your friend,.. if you're going for setting the hardware clock to UTC. 
  And --localtime if not.  Comparing hwclock's output to date's output 
will tell ya if everyone's in sync between the hardware and software 

Additionally once you get it booting and showing the correct time from 
the good old "date" command, and things seem to be "right"... fire up 
NTP to pool.ntp.org and "fugget-about-it" from then on.

ntpdate ... to forcibly slam (or slew slowly... see the manpage) the 
software clock to the correct time, and then forcibly stuffing the 
hardware clock into the motherboard right after that with the above 
--set command with the appropriate setting for UTC or Local will 
sometimes straighten out things quickly, if all the symlinks are already 
pointed where they're supposed to be.

Also, if you're dual-booting that machine, a common mistake is to choose 
UTC for the clock and then Winderz will crank it around to local time 
every time you boot to it.

Just some random thoughts from past experience at 1:15 AM... zzzzz... 
time for bed...


More information about the LUG mailing list