[Top][All Lists]

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

Re: Timezone change in US

From: Chris McMahan
Subject: Re: Timezone change in US
Date: Fri, 16 Mar 2007 08:25:01 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (windows-nt)

Eli Zaretskii <address@hidden> writes:

>> From: Chris McMahan <address@hidden>
>> Date: Thu, 15 Mar 2007 18:37:44 +0400
>> I use cygwin to launch emacs so I can manipulate my environment
>> settings and such within the tcsh shell, rather than my windows
>> environment. This minimizes the potential collisions in application
>> names and paths between my unix programs and my windows programs (some
>> of which use unix program names for basic management).
> I'm not sure I understand the potential problems.  Can you give an
> example of how starting Emacs from a Windows icon could cause trouble?

The main reason is that I'm setting up environment variables and paths
within my tcsh shell that are then used within emacs, but not within
Windows. There's probably no real compelling reason not to put them
into the Windows environment, but it's very nice to be able to just
edit the .tcshrc to make the necessary changes.

>> I've been using this system for roughly 12 years now, and have had no
>> real problems.
> I don't doubt the fact, I'm just saying that you were lucky.  Cygwin
> and native Windows programs are incompatible, so much so that I don't
> see any reason to try to figure out what went wrong in this specific
> case.

I think the only real problem comes in when you try to mix and match
the cygwin and windows utilities. I'm pointing my emacs installation
to use only the cygwin versions of utilities such as find, grep, ls,
awk and such, and so the incompatibilities have not been too much of
an issue for me.

>> As far as the TZ environment variable inside emacs, it is showing as
>>   TZ=EST5EDT4,M3.2.0/2,M11.1.0/2 
>> Which is correct for the new time zone rules.
> But we've already established that the Windows native versions of time
> functions don't grok this syntax of TZ.  I posted here a URL where the
> Microsoft documentation clearly shows that.  So I think it's no
> mystery anymore that the above value of TZ does not do what you
> expect: the runtime functions used by Emacs simply don't support such
> values of TZ.

Yes, thanks for posting that, it was helpful.

>> There is something in
>> the emacs program itself that still assuming I'm in EST
> That something is the code that interprets the value of TZ: it cannot
> parse the `M3.2.0/2,M11.1.0/2' part, so it doesn't switch to EDT4.

Then that may be the function to fix. It's apparently assuming that if
you're running windows, then it has to handle the TZ differently. The
problem is when you're running unix utilities such as I am, and the TZ
IS present in a unix format it can handle. Wouldn't it be better to
check the TZ variable itself for compatibilites, rather than assuming
based on the OS?

>> even though
>> the TCSH shell and MS Windows (XP) put me in EDT.
> Your tcsh is a Cygwin program, so it uses the Cygwin implementation of
> the time routines, which do grok this syntax of TZ.

I guess that's my basic point. Emacs should grok the TZ itself, and
make no assumptions based on the OS.

Changing my TZ environment variable to EDT4 fixed the problem in
emacs, and is also working in my shell. A less than optimal solution,
but it IS working now :)

Thanks for all of your help and patience on this. It was a good chance
to get into some emacs internals!

- Chris

     (.   .)
  Chris McMahan | address@hidden

reply via email to

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