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 14:58:51 +0200 Message-ID: <831uu7u8dw.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> <838vogt1tw.fsf@gnu.org> <837h40sztj.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1319115604 2200 80.91.229.12 (20 Oct 2011 13:00:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 20 Oct 2011 13:00:04 +0000 (UTC) Cc: eggert@cs.ucla.edu, 9794@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 20 14:59:59 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 1RGsE2-0004ZQ-VG for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Oct 2011 14:59:59 +0200 Original-Received: from localhost ([::1]:47411 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGsE2-0002ox-BJ for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Oct 2011 08:59:58 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:38777) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGsDz-0002of-L3 for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2011 08:59:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGsDy-0005Ja-FB for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2011 08:59:55 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGsDy-0005JU-CD for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2011 08:59:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RGsF4-00029o-7S for bug-gnu-emacs@gnu.org; Thu, 20 Oct 2011 09:01: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 13:01: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.13191156108230 (code B ref 9794); Thu, 20 Oct 2011 13:01:02 +0000 Original-Received: (at 9794) by debbugs.gnu.org; 20 Oct 2011 13:00:10 +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 1RGsED-00028g-Nu for submit@debbugs.gnu.org; Thu, 20 Oct 2011 09:00:10 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RGsEA-00027L-CZ for 9794@debbugs.gnu.org; Thu, 20 Oct 2011 09:00:08 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LTD00L007UL2Z00@a-mtaout21.012.net.il> for 9794@debbugs.gnu.org; Thu, 20 Oct 2011 14:58:50 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.212.197]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LTD00L4J8201W30@a-mtaout21.012.net.il>; Thu, 20 Oct 2011 14:58:50 +0200 (IST) In-reply-to: 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 09:01: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:52918 Archived-At: > From: Andreas Schwab > Cc: eggert@cs.ucla.edu, 9794@debbugs.gnu.org > Date: Thu, 20 Oct 2011 13:22:26 +0200 > > Eli Zaretskii writes: > > > No, I don't, because setting TZ=EST or some such in the environment > > will produce a compliant string. > > It does not match [+-]NNNN. But the output of %Z or current-time-zone isn't supposed to. E.g., on fencepost.gnu.org, I get "EDT". It's %z that produces [-+]NNNN. To step back a notch, the original issue was that current-time-zone can produce strings that are not RFC822 compliant, even on a Posix system, if the luser sets TZ to some arbitrary string. Paul says that any software that uses the output of current-time-zone should be able to detect this non-compliance and use %z instead. I'm asking how to do that. With a previous "work-around" on Windows, the test was easy: the output was a blank string, which is definitely not RFC822 compliant. If we remove that work-around, we can get something like "Pacific Daylight Time" instead, which is invalid according to RFC822. I'm asking how to detect such "invalid" zone names.