From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Sebastian Luque Newsgroups: gmane.emacs.help Subject: Re: date discrepancies Date: Thu, 02 Sep 2004 10:42:03 -0400 Organization: Memorial University of Newfoundland Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200409021042.03878.sluque@mun.ca> References: <87k6vdjgnv.fsf@thalassa.informatimago.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1094139734 30337 80.91.224.253 (2 Sep 2004 15:42:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 2 Sep 2004 15:42:14 +0000 (UTC) Cc: Pascal Bourguignon Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 02 17:41:53 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C2tii-0003Vm-00 for ; Thu, 02 Sep 2004 17:41:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C2tnh-00049G-Ac for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Sep 2004 11:47:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C2tnW-00049A-Sx for help-gnu-emacs@gnu.org; Thu, 02 Sep 2004 11:46:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C2tnW-00048y-6g for help-gnu-emacs@gnu.org; Thu, 02 Sep 2004 11:46:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C2tnW-00048v-3T for help-gnu-emacs@gnu.org; Thu, 02 Sep 2004 11:46:50 -0400 Original-Received: from [64.59.134.9] (helo=pd7mo3no.prod.shaw.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C2tiM-0005OR-4b for help-gnu-emacs@gnu.org; Thu, 02 Sep 2004 11:41:30 -0400 Original-Received: from pd6mr1no.prod.shaw.ca (pd6mr1no-qfe2.prod.shaw.ca [10.0.144.188]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0I3F0019T7IFXU10@l-daemon> for help-gnu-emacs@gnu.org; Thu, 02 Sep 2004 09:39:51 -0600 (MDT) Original-Received: from pn7ml4no.prod.shaw.ca ([10.0.149.113]) by pd6mr1no.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0I3F00M687IFYQA0@pd6mr1no.prod.shaw.ca> for help-gnu-emacs@gnu.org; Thu, 02 Sep 2004 09:39:51 -0600 (MDT) Original-Received: from s0106000ae61de208.wp.shawcable.net (S0106000ae61de208.wp.shawcable.net [24.77.43.235]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0I3F00G0K7IENB@l-daemon> for help-gnu-emacs@gnu.org; Thu, 02 Sep 2004 09:39:51 -0600 (MDT) In-reply-to: <87k6vdjgnv.fsf@thalassa.informatimago.com> Original-To: help-gnu-emacs@gnu.org Content-Disposition: inline User-Agent: KMail/1.6.2 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:20415 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20415 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