help-gnu-emacs
[Top][All Lists]
Advanced

[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 10:42:03 -0400
User-agent: KMail/1.6.2

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]