From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.bugs Subject: Re: bug#641: format-time-string %Z does not work, starting with Emacs 22.2 Date: Thu, 07 Aug 2008 08:20:46 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <86fxphgdw1.fsf@lifelogs.com> References: <4897737C.90709@gmx.at> <001501c8f67e$7c63b300$0200a8c0@us.oracle.com> <008601c8f756$9bce0f00$0200a8c0@us.oracle.com> <00a001c8f786$fa665d30$0200a8c0@us.oracle.com> <86skthj4yf.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1218116436 12491 80.91.229.12 (7 Aug 2008 13:40:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Aug 2008 13:40:36 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 07 15:41:27 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KR5jy-0003LX-L1 for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Aug 2008 15:41:18 +0200 Original-Received: from localhost ([127.0.0.1]:33937 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KR5ix-0004BZ-Bb for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Aug 2008 09:40:15 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news.unit0.net!newsfeeder.dynfx.net!weretis.net!news.albasani.net!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 34 Original-X-Trace: news.albasani.net 2ftNV39YzeH2jypcr3tjs8w9Kkvt/0IZQ/wVftiavuj83jDEYuG3iejAJ563DVgkXnClirS+ednwEqw4351XUU6tAZmB/JLTYoc5y6L9dGcFs8B9OjIZh3HBSiThDSn3 Original-X-Complaints-To: abuse@albasani.net Original-NNTP-Posting-Date: Thu, 7 Aug 2008 13:15:57 +0000 (UTC) X-User-ID: TznDclVjbFrgtMMBmp/lc3e0yNicur9q5OY5TGrYE18= X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Cancel-Lock: sha1:Zx1Ubd6NS7RAtVhv70cH8dpw1yQ= sha1:Tfvs4zbfSVTo06j1TJS4g25PEQs= User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) X-NNTP-Posting-Host: 8DGoWznYwjXRfJHiUFc4UD1Xw+df1h/PJ9+PLvBaEzY= Original-Xref: news.stanford.edu gnu.emacs.bug:46137 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:19091 Archived-At: On Wed, 6 Aug 2008 23:35:16 +0200 "Juanma Barranquero" wrote: JB> On Wed, Aug 6, 2008 at 21:53, Ted Zlatanov wrote: >> 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 JB> It does return the "Microsoft timezone name", not Posix. In my system, JB> it currently returns "Hora de verano romance". On Thu, 07 Aug 2008 00:20:36 +0300 Eli Zaretskii wrote: EZ> But this is a different problem. The problem I wanted to solve is to EZ> get something like JST+2JDT instead of "Jerusalem Daylight Time". And EZ> that cannot be solved by using Windows API, AFAIK, because the latter EZ> is what Windows stores as the TZ name in its database. In particular, EZ> a test program that prints the TZ name returned by EZ> GetTimeZoneInformation is the same "Jerusalem Daylight Time" that we EZ> find in `tzname'. I don't think RFC-822 compliant TZ names such as EZ> EST-5EDT can be found anywhere in the Windows APIs and libraries, but EZ> I'd be glad to be proven wrong. We could build a database of known Microsoft timezones and map them to ISO timezones. It has to be done just once and then updated very rarely--timezone names don't change often. The full list of timezones is in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones according to the article, so it may be possible to build the full list of keys on a single machine and then fill it in with the mappings. Ted