Mailing List Archive

Time Zone configuration
Hi

I have a trouble to correct time for Linux; I use EDT and when I typed
at command prompt: ln -sf /usr/share/zoneinfo/America/Montreal
/etc/localtime the time become with difference of -4h form the real
time. How to correct this please?

IcEonFirE


--
gentoo-user@gentoo.org mailing list
Re: Time Zone configuration [ In reply to ]
HI

Thanks for replying. I would likde to know how to set the kernel time
with please ?

Thanks

On Fri, 2004-10-15 at 12:53, Felix Tiede wrote:
> Chiheb Djabri wrote:
> > Hi
> >
> > I have a trouble to correct time for Linux; I use EDT and when I typed
> > at command prompt: ln -sf /usr/share/zoneinfo/America/Montreal
> > /etc/localtime the time become with difference of -4h form the real
> > time. How to correct this please?
> >
> That's caused by the fact that your kernel time is not reset by setting the
> correct timezone. So the kernel time (I think it's UTC, but I don't know
> exactly) is simply displayed in another timezone, which "moves" it to -4h.
> Only thing you can do about this is to set /etc/localtime as soon as
> possible (I usually do it after chrooting into gentoo's install folder) and
> then setting the kerneltime with 'date'.
>
> In your case you simply need to set the kernel-time (which will be
> incorrectly stored in your RTC on shutdown!) with 'date'.
>
> HTH, greetings
> Felix
>
> --
> gentoo-user@gentoo.org mailing list
>


--
gentoo-user@gentoo.org mailing list
Re: Time Zone configuration [ In reply to ]
Chiheb Djabri wrote:
> Hi
>
> I have a trouble to correct time for Linux; I use EDT and when I typed
> at command prompt: ln -sf /usr/share/zoneinfo/America/Montreal
> /etc/localtime the time become with difference of -4h form the real
> time. How to correct this please?
>
That's caused by the fact that your kernel time is not reset by setting the
correct timezone. So the kernel time (I think it's UTC, but I don't know
exactly) is simply displayed in another timezone, which "moves" it to -4h.
Only thing you can do about this is to set /etc/localtime as soon as
possible (I usually do it after chrooting into gentoo's install folder) and
then setting the kerneltime with 'date'.

In your case you simply need to set the kernel-time (which will be
incorrectly stored in your RTC on shutdown!) with 'date'.

HTH, greetings
Felix

--
gentoo-user@gentoo.org mailing list
Re: Time Zone configuration [ In reply to ]
Chiheb Djabri wrote:
> HI
>
> Thanks for replying. I would likde to know how to set the kernel time
> with please ?
>
> Thanks
>

This is covered in the Handbook, and in man date (naturally), but:

In a root terminal, type 'date' (without quotations and without
arguments) to see what the system thinks the current date and time is.

If the date/time displayed is wrong, update it using the date
MMDDhhmmYYYY syntax (Month, Day, hour, minute and Year). For instance,
to set the date to April 25th, 16:21 in the year 2004:

Code Listing 2: Setting the date/time

# date 042516212004

Holly

--
gentoo-user@gentoo.org mailing list