all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chris McMahan <first_initiallastname@one.dot.net>
To: help-gnu-emacs@gnu.org
Subject: Re: Timezone change in US
Date: Wed, 14 Mar 2007 08:22:02 -0500	[thread overview]
Message-ID: <u4pooez9h.fsf@one.dot.net> (raw)
In-Reply-To: u8xe0f0ro.fsf@one.dot.net

Chris McMahan <first_initiallastname@one.dot.net> writes:

> James Cloos <cloos@jhcloos.com> writes:
>
>
>>>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
>>
>>>> From: James Cloos <cloos@jhcloos.com>
>>>> Copyright: Copyright 2007 James Cloos
>>>> Date: Tue, 13 Mar 2007 12:48:24 -0400
>>>> Cc: help-gnu-emacs@gnu.org
>>>> 
>>>> 
>>>> Probably a stupid question, but what happens if you set your TZ
>>>> variable to just 'EST5EDT'?  Or 'EST5EDT4,M3.2.0/2:00,M11.1.0/2:00'?
>>>> 
>>>> 02:00 is the default for the time string, so this should be the same
>>>> as what you had:  'EST5EDT4,M3.2.0,M11.1.0'.  Does that work?
>>>> 
>>>> The 4 after EDT is also superfluous.  So each of these may be worth
>>>> a try:
>>>> 
>>>> EST5EDT,M3.2.0/2,M11.1.0/2
>>>> EST5EDT,M3.2.0/2:00,M11.1.0/2:00
>>>> EST5EDT,M3.2.0,M11.1.0
>>
>> Eli> I don't think Windows time routines support the above syntax.
>> Eli> See: [...]
>>
>> I mis-remembered the details of an earlier discussion about the TZ
>> variable and win32.  However, the fact that his tcsh shows the correct
>> data with the full POSIX TZ syntax suggests that at least mingw32's
>> localtime(3) may grok said syntax.  (A quick check of tcsh's src shows
>> that it directly calls localtime(3), rather than using an external
>> app, to put the time in its prompt.)
>>
>> Eli> Maybe the problem is precisely that tcsh sets TZ to this form, which
>> Eli> confuses Emacs on Windows.  In that case, running Emacs from without
>> Eli> tcsh should solve the problem.
>>
>> That possibility is essentially why I suggested trying EST5EDT first.
>>
>> Eli> Note that this Posix syntax of TZ, and the zoneinfo database, are also
>> Eli> not supported by the Windows time routines.
>
>>>> So this is a win32 or mingw32 specific bug.
>>
>> Eli> Perhaps it is a w32 specific bug, but then why does it work for me?
>>
>> I did jump to that conclusion based on the fact that tcsh was able to
>> get the correct offset and the presumption that it was also compiled
>> by way of mingw32.  I see in its src, however, that tcsh has native
>> support for compiling in VisualC++, so that is likely a false presumption.
>>
>> Nonetheless, obviously tcsh's call to localtime(3) works whereas
>> emacs' attempt to get more detail is failing.
>>
>> Even though I do not use win I am very intrigued by this¹ and am
>> interested in discovering what is going wrong.
>>
>> One important issue is that, if win32 is simply ignoring everything
>> after "EDT" in his TZ, and if his install has not been updated to
>> reflect the new DST start/stop dates, he is seeing exactly what one
>> would expect:  EST rather than EDT.  Which does make it odd that
>> everything else (native or not) gets it right....
>>
>> -JimC
>
> I tried several variations. Interestingly, on following Eli's
> suggestion, I launched emacs directly from the windows environment
> (double-clicking on the runemacs icon) and the time was correct!
>
> I unset the TZ variable in tcsh. The shell reflected the old (pre DST)
> time, and so did emacs (no change in emacs). I set it to some odd
> value, the shell showed a time 4 hours into the future, but emacs
> still showed the pre DST time.
>
> The short version here is that the TZ variable had no effect on emacs
> whatsoever.
>
> I'm getting the time displayed on my modeline from the time package,
> and calling display-timer to show it.
>
> - Chris

To follow up with some more details.

I did some more experiments with the TZ variable within my shell, and
it does have some effect on emacs. It seems that emacs ignores
everything in the TZ variable after the initial statement EST5EDT4. If
I set it to EST4EDT3, then emacs shows the change (of course so does
my shell). It seems that the time zone rules are still being hardcoded
incorrectly somewhere within my Cygwin environment (yes I've updated
my Cygwin packages :). I'm working on tracking that down.

- Chris

-- 
     (.   .)
  =ooO=(_)=Ooo=====================================
  Chris McMahan | first_initiallastname@one.dot.net
  =================================================

  reply	other threads:[~2007-03-14 13:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-12 15:31 Timezone change in US Chris McMahan
2007-03-12 16:58 ` Maarten Bergvelt
2007-03-12 17:01   ` Chris McMahan
2007-03-12 21:58 ` Eli Zaretskii
     [not found] ` <mailman.851.1173736718.7795.help-gnu-emacs@gnu.org>
2007-03-13 13:28   ` Chris McMahan
2007-03-13 16:48     ` James Cloos
2007-03-13 21:12       ` Eli Zaretskii
2007-03-14 11:42         ` James Cloos
2007-03-14 18:52           ` Eli Zaretskii
     [not found]         ` <mailman.916.1173872744.7795.help-gnu-emacs@gnu.org>
2007-03-14 12:49           ` Chris McMahan
2007-03-14 13:22             ` Chris McMahan [this message]
2007-03-14 19:02               ` Eli Zaretskii
     [not found]               ` <mailman.936.1173898991.7795.help-gnu-emacs@gnu.org>
2007-03-15 14:37                 ` Chris McMahan
2007-03-15 20:10                   ` Eli Zaretskii
     [not found]                   ` <mailman.971.1173989456.7795.help-gnu-emacs@gnu.org>
2007-03-16 12:25                     ` Chris McMahan
2007-03-16 13:11                       ` Eli Zaretskii
2007-03-16 13:58                       ` Stefan Monnier
2007-03-14 18:58             ` Eli Zaretskii
2007-03-13 21:05     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u4pooez9h.fsf@one.dot.net \
    --to=first_initiallastname@one.dot.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.