[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Weird time prob



Hi,

On Sun, Oct 24, 1999 at 02:06:04AM +0200, Martin "Nightowl" Byttebier wrote:
> Hello,
> 
> I just ran into a weird problem with the time.
> 
> executing /home/root/.bashrc
> executing /home/root/.bash_login
> who: root     console  Sun Oct 24  2:50:42
> root     ttyp0    Sun Oct 24  1:52:14 (hades060)
> root@hades060/home/root>
> 
> As you will see the console is one hour ahead of the ttyp0.
> It seems that sometime has change the console time at midnight.
> I wonder what has caused this and what I can do to change the time back to 
> the real time.
> 
> BTW: My system runs in UTC MINT_CLOCKMODE

You live in Belgium, right?  That means that you would be currently two
hours ahead of UTC (because DST is in use).  So, if the difference would
be two hours it would be a general problem.  Since it is only one hour it
looks like the program that opened the console wasn't aware that we have
summertime whereas the program that opened the pseudo terminal (resp. your
"who" command) is.

Your problematic programs are probably "init" and "getty", maybe "login"
also.  The next problem is that it is actually recommended not to set $TZ
at all (because that's what /usr/share/zoneinfo is for).  But the old
programs do not know about /usr/share/zoneinfo and need an explicit
setting for $TZ.

If only a particular daemon has problems without $TZ being present, that
is no problem.  If you had

	/usr/etc/inetd

in your startup scripts you simply replace that with

	TZ=CEST-2 /usr/etc/inetd

and only inetd will see that environment variable, other programs are not
affected.

Unfortunately, esp. with init, getty and login this is not possible.
Until there is a replacement for these programs, sigh, I have to recommend
that you put a line

setenv TZ=CEST-2

(other users should replace "CEST-2" with their valid setting) into your
mint.cnf *after* you run tzinit (so that at least the kernel will always
get the correct rules from your tz database). And, remember, tzinit should
be started from mint.cnf, *not* from any startup scripts.

This problem will vanish in the future.  I haven't set $TZ at all and my
test versions of various programs (init, mingetty, login, inetd, syslogd,
crond, ...) all work flawlessly (as far as time is concerned).

Don't forget to disable summer time on the last Sunday of October (mostly
correct for the norther hemisphere).  For Belgium replace "CEST-2" with
"CET-1".

And, btw, of course I know that you can also specify both your "normal"
and summertime at once in $TZ.  But those programs that don't care about
/usr/share/zoneinfo/localtime mostly won't understand that syntax (or even
crash like the old smail).

Ciao

Guido
-- 
http://stud.uni-sb.de/~gufl0000/
mailto:gufl0000@stud.uni-sb.de