From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#641: format-time-string %Z does not work, starting with Emacs 22.2 Date: Thu, 07 Aug 2008 00:20:36 +0300 Message-ID: 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> Reply-To: Eli Zaretskii , 641@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1218059285 23068 80.91.229.12 (6 Aug 2008 21:48:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Aug 2008 21:48:05 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Ted Zlatanov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 06 23:48:55 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 1KQqsD-0001FJ-UB for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Aug 2008 23:48:50 +0200 Original-Received: from localhost ([127.0.0.1]:33774 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQqrI-0007Hm-HA for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Aug 2008 17:47:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQqr3-00076i-EI for bug-gnu-emacs@gnu.org; Wed, 06 Aug 2008 17:47:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQqr1-00076K-Nn for bug-gnu-emacs@gnu.org; Wed, 06 Aug 2008 17:47:37 -0400 Original-Received: from [199.232.76.173] (port=58675 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQqr1-00076H-Ig for bug-gnu-emacs@gnu.org; Wed, 06 Aug 2008 17:47:35 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:54774) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KQqr1-0000Jv-9h for bug-gnu-emacs@gnu.org; Wed, 06 Aug 2008 17:47:35 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m76LlNob020685; Wed, 6 Aug 2008 14:47:23 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m76LU35A015054; Wed, 6 Aug 2008 14:30:03 -0700 X-Loop: don@donarmstrong.com Resent-From: Eli Zaretskii Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , don@donarmstrong.com Resent-Date: Wed, 06 Aug 2008 21:30:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 641 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.121805768213345 (code B ref -1); Wed, 06 Aug 2008 21:30:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 6 Aug 2008 21:21:22 +0000 Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m76LLHDH013339 for ; Wed, 6 Aug 2008 14:21:18 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQqRY-0003XC-PF for bug-gnu-emacs@gnu.org; Wed, 06 Aug 2008 17:21:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQqRX-0003Wz-Fd for bug-gnu-emacs@gnu.org; Wed, 06 Aug 2008 17:21:16 -0400 Original-Received: from [199.232.76.173] (port=37936 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQqRX-0003Ww-46 for bug-gnu-emacs@gnu.org; Wed, 06 Aug 2008 17:21:15 -0400 Original-Received: from mtaout5.012.net.il ([84.95.2.13]:50494) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KQqRX-0005bf-1S for bug-gnu-emacs@gnu.org; Wed, 06 Aug 2008 17:21:15 -0400 Original-Received: from HOME-C4E4A596F7 ([77.126.7.152]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K5700A937AROOR1@i_mtaout5.012.net.il> for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2008 00:20:51 +0300 (IDT) In-reply-to: <86skthj4yf.fsf@lifelogs.com> X-012-Sender: halo1@inter.net.il X-detected-kernel: by monty-python.gnu.org: Solaris 9.1 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Wed, 06 Aug 2008 17:47:36 -0400 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:19078 Archived-At: > From: Ted Zlatanov > 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.