From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.bugs Subject: bug#9794: 24.0.90; `format-time-string' no good for %Z Date: Fri, 21 Oct 2011 23:40:20 +0800 Message-ID: <87vcrifj4r.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> <83botct3qv.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1319211721 20626 80.91.229.12 (21 Oct 2011 15:42:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 21 Oct 2011 15:42:01 +0000 (UTC) Cc: Paul Eggert , 9794@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 21 17:41:53 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 1RHHEH-0007rf-IP for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Oct 2011 17:41:53 +0200 Original-Received: from localhost ([::1]:53524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHHEH-00074B-14 for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Oct 2011 11:41:53 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:60747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHHEE-00073y-7b for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2011 11:41:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHHEB-0006X1-M8 for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2011 11:41:50 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHHEB-0006Ww-Kd for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2011 11:41:47 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RHHFN-0000B9-QY for bug-gnu-emacs@gnu.org; Fri, 21 Oct 2011 11:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jason Rumney Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Oct 2011 15:43:01 +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.1319211722619 (code B ref 9794); Fri, 21 Oct 2011 15:43:01 +0000 Original-Received: (at 9794) by debbugs.gnu.org; 21 Oct 2011 15:42:02 +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 1RHHEQ-00009w-0C for submit@debbugs.gnu.org; Fri, 21 Oct 2011 11:42:02 -0400 Original-Received: from mail-yw0-f44.google.com ([209.85.213.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RHHEN-00009Q-3a for 9794@debbugs.gnu.org; Fri, 21 Oct 2011 11:42:00 -0400 Original-Received: by ywt2 with SMTP id 2so439749ywt.3 for <9794@debbugs.gnu.org>; Fri, 21 Oct 2011 08:40:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=z+xTgvK2CCpedT+httZ3fPLiFS4gI5nOeECZFoeJBqs=; b=S6Jf5Sr3o8wYWEaO3d2JYPIEDY4nWU+Q3w/IDkNqVE3euO1lNYVo45N3mQx9Tati+c /aQ6eN8Wxesk9N8Zh1vPQk0sc/8W5Wdjf3Ryf2noFL9g2XlEV/O1mqQlJ5MQi7KaqXWJ PTdhi2J6qEdJpVz2SSo1LAOsInq6t5eKA+IpE= Original-Received: by 10.68.14.105 with SMTP id o9mr28560701pbc.95.1319211638250; Fri, 21 Oct 2011 08:40:38 -0700 (PDT) Original-Received: from home.jasonrumney.net ([180.75.148.1]) by mx.google.com with ESMTPS id ko15sm31609646pbb.9.2011.10.21.08.40.25 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 21 Oct 2011 08:40:29 -0700 (PDT) Original-Received: by home.jasonrumney.net (Postfix, from userid 1000) id 874531826; Fri, 21 Oct 2011 23:40:20 +0800 (MYT) In-Reply-To: <83botct3qv.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 20 Oct 2011 11:24:24 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 21 Oct 2011 11:43:01 -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:52991 Archived-At: Eli Zaretskii writes: >> 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? Lisp code that needs RFC822 compliance should just use %z. Only a small subset of timezone abbreviations are allowed by RFC822: zone = "UT" / "GMT" ; Universal Time ; North American : UT / "EST" / "EDT" ; Eastern: - 5/ - 4 / "CST" / "CDT" ; Central: - 6/ - 5 / "MST" / "MDT" ; Mountain: - 7/ - 6 / "PST" / "PDT" ; Pacific: - 8/ - 7 / 1ALPHA ; Military: Z = UT; ; A:-1; (J not used) ; M:-12; N:+1; Y:+12 / ( ("+" / "-") 4DIGIT ) ; Local differential ; hours+min. (HHMM) So Paul is probably correct - we should not worry about RFC / POSIX or whatever compliance for %Z. > 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 [...] A translation of the original report is here: http://www.m17n.org/mlarchive/mule-ja/200102/msg00072.html The original problem leading to that report seems to have been observed in a beta version of mew: http://groups.yahoo.co.jp/group/emacs21-users-ja/message/42