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

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

Re: bug#641: format-time-string %Z does not work, starting with Emacs 22


From: Ted Zlatanov
Subject: Re: bug#641: format-time-string %Z does not work, starting with Emacs 22.2
Date: Wed, 06 Aug 2008 14:53:12 -0500
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

On Wed, 06 Aug 2008 21:53:58 +0300 Eli Zaretskii <eliz@gnu.org> wrote: 

EZ> Strings we find in the Windows version of `tzname' do not follow the
EZ> above form: they are just text describing the time zone, they include
EZ> blanks, and they are localized (so instead of, e.g., "Jerusalem
EZ> Standard Time" you may well see something in Hebrew).  I submit that
EZ> emitting such time-zone names instead of standard compliant form is a
EZ> bad idea.  It is IMO better to not emit the name at all than emit the
EZ> Windows names.  Fortunately, the Posix standard of `strftime'
EZ> explicitly says that %Z could produce an empty string, so programs
EZ> that expect what %Z produces should also expect to see an empty
EZ> string.  So we decided to use this fire escape because behaving as if
EZ> `tzname' was not available on Windows is better than inducing
EZ> potential breakage on recipients of such non-standard time-zone names.

EZ> (If Windows time-zone names were always in US English, we could
EZ> perhaps repair this by translating them to the equivalent RFC-822
EZ> compliant identifiers.  But because they can also be localized, this
EZ> job is much harder, unless someone comes up with an exhaustive list of
EZ> all the possible spellings of each and every one of Windows time-zone
EZ> names.)

Does this help?  The Microsoft documentation linked by this article
implies that GetTimeZoneInformation() will DTRT.

http://www.chronos-st.org/Discovering%20the%20Local%20Time%20Zone--Why%20It%27s%20a%20Hard%20Problem.html

Ted


reply via email to

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