Re: Changing time.

Rinendra Shakya (rinendra.shakya@yale.edu)
Fri, 29 Jan 1999 07:11:04 -0500

Thanks for the reply. I do also run Windows 95 on my computer and it knows
the time fine. I tried to follow step 2 below:

1. could not find the command tzconfig (this might not be available under
Redhat)

This is what the /etc/rc.d/rc.sysinit says:

# Set the system clock.
echo -n "Setting clock"

ARC=0
UTC=0
if [ -f /etc/sysconfig/clock ]; then
. /etc/sysconfig/clock

# convert old style clock config to new values
if [ "${CLOCKMODE}" = "GMT" ]; then
UTC=true
elif [ "${CLOCKMODE}" = "ARC" ]; then
ARC=true
fi
fi

if [ -x /sbin/hwclock ]; then
CLOCKFLAGS="--hctosys"
CLOCK=/sbin/hwclock
else
CLOCKFLAGS="-a"
CLOCK=/sbin/clock
fi

case "$UTC" in
yes|true)
CLOCKFLAGS="$CLOCKFLAGS -u";
echo -n " (utc)"
;;
esac

case "$ARC" in
yes|true)
CLOCKFLAGS="$CLOCKFLAGS -A";
echo -n " (arc)"
;;
esac

echo -n ": "
$CLOCK $CLOCKFLAGS

date

I think something here may be the problem. The /etc/sysconfig/clock says:
UTC=true
ARC=false

Rinendra
Ken Lai wrote:

> Do you run other operating systems on your computer?
> Do you have the hardware clock set to EST or GMT?
> I'm guessing your hwclock is on GMT, but your box thinks it's on EST.
> You can fix it in two ways:
> 1. change the time on your hwclock
> 2. change the timezone your box thinks it's in.
>
> For (2), I think the command in Debian is tzconfig. I'm not sure if it's
> the same in RedHat. If not, you can manually make the link /etc/localtime
> point to the correct timezone in /usr/share/zoneinfo
> However, you might end up making your box run completely on GMT, which can
> be confusing. In that case, change the GMT="-u" to GMT="" in your boot
> script default. (/etc/defaults/rcS in debian)
>
> I hope I didn't confuse you too much; maybe someone with RH5.2 will be
> more help to you.
>
> - Ken
>
> On Fri, 29 Jan 1999, Rinendra Shakya wrote:
>
> > Hello. My date() says Fri Jan 29 05:19:25 EST 1999 when actually it is
> > 10:23. Could you please let me know how I can change this to the correct
> >
> > EST. I think the time returned is GMT. I am running Redhat 5.2.
> >
> > Thanks
> >
> > Rinendra
> >
>
> --
> Ken Lai <min-ken.lai@yale.edu> also at ken.lai@WriteMe.com
> http://pantheon.yale.edu/~ml267/ ICQ# 5845632