[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: date discrepancies
From: |
Sebastian Luque |
Subject: |
Re: date discrepancies |
Date: |
Thu, 02 Sep 2004 12:17:00 -0400 |
User-agent: |
KMail/1.6.2 |
I have just found out that launching emacs from a shell (typing either 'emacs'
or 'emacs21') and then typing 'M-! date' gives the correct time and time
zone. However, launching emacs from the K-menu in KDE, which is set
to /usr/bin/emacs21, gives the incorrect time zone. So the difference is not,
in fact, linked to the various emacs binaries, but to the environment in
place when launching the application from k-menu, as opposed to a shell.
Sebastian
On Thu, 2 September 2004 10:42 -0500, Sebastian Luque wrote:
> Thanks Pascal, I'm a bit confused about which environment Emacs is getting
> to run shell commands. All date and time variables are correct in shell.
> I'm using a Debian box and checking the binaries for emacs, there are three
> of them: emacs, emacs21, and emacs21-x. I've always been using emacs21,
> which gives the wrong time. But if I run emacs, then it gives the correct
> time variables. Why is there a difference?
>
> On Thu, 2 September 2004 03:04 -0500, Pascal Bourguignon wrote:
> > To see the time zone in emacs, type in *scratch*: (getenv "TZ") C-u C-x
> > C-e To see it in shell, type: echo $TZ
>
> Under emacs21, the result was "nil", and in shell, I get
> "America/Winnipeg", which is correct.
>
> > Try it in a shell on xterm and in a shell on emacs: M-x shell RET echo
> > $TZ RET
>
> This emacs command gives the correct result, using emacs21. However, in the
> same session, M-! echo $TZ, gives no output. I'm very confused; M-x shell
> and M-! seem to be getting different environments.
>
> > You can correct it either by modifying the environment used by the
> > program that launches emacs, or from emacs using:
> >
> > (setenv "TZ" "CEST") C-x C-e
> >
> > or inserting: (setenv "TZ" "CEST")
> > in your ~/.emacs
>
> Because my time has been already correctly set, changing it like this
> messes it up, and now the time is incorrect both in shell and in emacs M-!
> date, although the time zone shows ok. Very strange.
>
> There is a difference between emacs and emacs21 that I'm not understanding.
> Any comments would be greatly appreciated.
>
> Cheers,
> Sebastian
>
>
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs