Can't change time from UTC to localtime

Dale Farnsworth dale at farnsworth.org
Sat Aug 13 20:30:38 MST 2005


On Sat, Aug 13, 2005 at 03:24:44PM +0000, Siri Amrit Kaur wrote:
>  Dale Farnsworth kindly wrote:
> > On Sat, Aug 13, 2005 at 08:55:14AM +0000, Siri Amrit Kaur wrote:
> > > Well now, this is interesting!
> > >
> > > I sent the original email (below) a few minutes ago from my
> > > computer. It just showed up in the incoming mail and the time is
> > > correct (or correct enough) at 8:48AM.
> >
> > More interesting to me is that your original e-mail date header
> > shows that it was sent at 08:48 UTC (01:48 MST).
> >
> > What time does the "date" command show on your system?
> >
> At 3:23 PM I ran "date":
> 
> tigerflag at localhost:~$ date
> Sat Aug 13 15:23:10 UTC 2005

So the first problem is that your clock is indeed 7 hours behind.
Without the timezone correctly set, it should have said:
	Sat Aug 13 22:23:10 UTC 2005

The next step is to set your timezone.  I don't know what distribution
you have, but you might try the following commands:
	tzconfig
	tzsetup
	timeconfig

If none of those work, you can do it manually.  Try
	echo US/Arizona >/etc/timezone
	cp /usr/share/zoneinfo/US/Arizona /etc/localtime

At that point, your timezone should be set properly, and date should
display the time in MST.

You should then set the CMOS clock with the hwclock utility.
If you dual boot your system with windows, you should do
	hwclock --systohc --localtime
If you don't use windows on the computer, you should instead do
	hwclock --systohc --utc

After doing that, I'd probably reboot the system so the daemons
have the correct timezone.

-Dale


More information about the PLUG-discuss mailing list