From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Pascal Bourguignon Newsgroups: gmane.emacs.help Subject: Re: date discrepancies Date: 02 Sep 2004 07:04:04 +0000 Organization: [posted via Easynet Spain] Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87k6vdjgnv.fsf@thalassa.informatimago.com> References: <412CB73C.9050506@yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1094108718 12077 80.91.224.253 (2 Sep 2004 07:05:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 2 Sep 2004 07:05:18 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 02 09:05:08 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 1C2lee-0000Hl-00 for ; Thu, 02 Sep 2004 09:05:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C2ljb-0002qz-MH for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Sep 2004 03:10:15 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.wirehub.nl!news2.euro.net!zen.net.uk!demorgan.zen.co.uk!195.40.4.120.MISMATCH!easynet-quince!easynet.net!easynet-post2!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 Original-Lines: 38 Original-NNTP-Posting-Host: 62.93.174.79 Original-X-Trace: DXC=dM4WA:X`V6LY2oeh2PP@HCEY<>`XO4V7M>Uh 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:20409 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20409 Sebastian Luque writes: > Dear List, > > I've discovered something I can't explain and correct. Whenever I type: > > M-! date > > to send the date command to the shell, I get a different time and time zone > that I get from running the command on a standard bash shell. I have set my > clock to Central Daylight Savings Time, and this is what I get from the > standard bash shell, but when running the command from within Emacs, I get > the corresponding Eastern Daylight Savings Time. Would somebody please > explain what is going on and how can this be fixed? Thanks in advance. It depends on how you launch emacs, therefore what environment variables are present. The zone is determined by the variable TZ, or if absent, by the file /etc/locatime. 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 Try it in a shell on xterm and in a shell on emacs: M-x shell RET echo $TZ RET 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 -- __Pascal Bourguignon__ http://www.informatimago.com/ Our enemies are innovative and resourceful, and so are we. They never stop thinking about new ways to harm our country and our people, and neither do we.