[Top][All Lists]

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

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

From: Eli Zaretskii
Subject: bug#641: format-time-string %Z does not work, starting with Emacs 22.2
Date: Thu, 07 Aug 2008 00:20:36 +0300

> From: Ted Zlatanov <tzz@lifelogs.com>
> Date: Wed, 06 Aug 2008 14:53:12 -0500
> 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

Thanks, but unfortunately it doesn't help.

That article explains how to know and apply the complicated rules of
the switch to DST.  Windows XP already knows that: the relevant rules,
which on Posix machines are in the /usr/share/zoneinfo directory, are
stored on Windows in the Registry.  And last year, when the US
switched to complex DST rules, Microsoft published an update that
imported the DST rules for most of the world into the Registry, so now
every Windows installation can automatically switch to DST and back.

But this is a different problem.  The problem I wanted to solve is to
get something like JST+2JDT instead of "Jerusalem Daylight Time".  And
that cannot be solved by using Windows API, AFAIK, because the latter
is what Windows stores as the TZ name in its database.  In particular,
a test program that prints the TZ name returned by
GetTimeZoneInformation is the same "Jerusalem Daylight Time" that we
find in `tzname'.  I don't think RFC-822 compliant TZ names such as
EST-5EDT can be found anywhere in the Windows APIs and libraries, but
I'd be glad to be proven wrong.

reply via email to

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