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

Previous Next

Packages: w32, emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Fri, 1 Aug 2008 16:55:06 UTC

Severity: wishlist

Merged with 9794

Found in versions 22.2, 23.0.60, 24.0.90

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #71 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: 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 <at> 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.





This bug report was last modified 13 years and 270 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.