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#9794: 24.0.90; `format-time-string' no good for %Z Date: Thu, 20 Oct 2011 11:24:24 +0200 Message-ID: <83botct3qv.fsf@gnu.org> References: <68A313A7DDAA4912A255DAFE495606F9@us.oracle.com> <24FDB65B0E784E978085D30A7CBF9FAF@us.oracle.com> <8362jlv0rq.fsf@gnu.org> <87fwipgltl.fsf@gnu.org> <83pqhtt144.fsf@gnu.org> <4E9FD232.9090502@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1319102771 8940 80.91.229.12 (20 Oct 2011 09:26:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 20 Oct 2011 09:26:11 +0000 (UTC) Cc: 9794@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 20 11:26:05 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RGot3-0007Uc-9V for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Oct 2011 11:26:05 +0200 Original-Received: from localhost ([::1]:58739 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGot2-0004N0-On for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Oct 2011 05:26:04 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:45791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGosz-0004Mr-2J for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2011 05:26:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGost-0005KR-Ag for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2011 05:26:00 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGost-0005KN-3i for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2011 05:25:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RGoty-0004ro-EU for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2011 05:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Oct 2011 09:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9794 X-GNU-PR-Package: emacs,w32 X-GNU-PR-Keywords: Original-Received: via spool by 9794-submit@debbugs.gnu.org id=B9794.131910278018654 (code B ref 9794); Thu, 20 Oct 2011 09:27:02 +0000 Original-Received: (at 9794) by debbugs.gnu.org; 20 Oct 2011 09:26:20 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGotI-0004qp-LF for submit@debbugs.gnu.org; Thu, 20 Oct 2011 05:26:20 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGotF-0004qX-OO for 9794@debbugs.gnu.org; Thu, 20 Oct 2011 05:26:19 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LTC00B00Y41K200@a-mtaout22.012.net.il> for 9794@debbugs.gnu.org; Thu, 20 Oct 2011 11:24:25 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.212.197]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LTC009U0Y4K85E0@a-mtaout22.012.net.il>; Thu, 20 Oct 2011 11:24:22 +0200 (IST) In-reply-to: <4E9FD232.9090502@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 20 Oct 2011 05:27:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:52908 Archived-At: > Date: Thu, 20 Oct 2011 00:48:02 -0700 > From: Paul Eggert > CC: Jason Rumney , drew.adams@oracle.com, > 9794@debbugs.gnu.org > > Michael Schierl reported the current-time-zone issue to RMS in 2007; see > . > But somehow the light bulb didn't go off, and current-time-zone > wasn't fixed. Instead a workaround was installed, which basically > said "On Windows, don't ever generate time zone names, because > they might contain non-ASCII characters." That's not a fair description of what was done. In response to my question of whether this was too drastic a measure, Jason explained the real reason for the change he did: Non-ASCII is a side issue, and treating it as the main issue is what caused us to install an incorrect fix originally. The original issue reported a number of years ago, was that the timezone names for the Japanese locale on Windows are not RFC 822 compliant. So we suppressed them in certain conditions, but in fact, the timezone names are not RFC 822 compliant in most locales on Windows. Unless we use a lookup table to figure out which names are RFC compliant and which aren't, then I don't see a way we can leave them enabled. > Any code that assumes that (format-time-string "%Z") must generate > an RFC822 zone is making an unwarranted assumption and should be > fixed. Fixed how? Given some arbitrary string, how can Lisp code check whether it is or isn't compliant? Non-ASCII characters are easy to check, but what about time zones that include only ASCII characters? And anyway, if all bets are off about the strings returned by current-time-zone, then what exactly is its contract? If we are going to require Lisp code to check the values and reject non-compliant ones, we should at the very least provide a utility function to do that correctly. Can you suggest such a function? > I did a quick scan for such code in Emacs and didn't find > any. Perhaps there's some out-of-Emacs Lisp code that's making > the assumption, but if so, that code needs to be fixed because > in general it does not work and has never worked. Jason, can you point out which package(s) needed an RFC822-compliant time zone name? In the mail exchange I found, you just say [...] since the result of current-time-zone is used for mail headers, where non-ASCII characters are not allowed, and the POSIX timezone names are expected [...]