From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "N. Raghavendra" Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: timezone-parse-date Date: 09 Jul 2005 11:13:37 +0530 Message-ID: <86r7e8ilfa.fsf@riemann.mri.ernet.in> Reply-To: "N. Raghavendra" NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1120888405 2532 80.91.229.2 (9 Jul 2005 05:53:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 9 Jul 2005 05:53:25 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 09 07:53:14 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dr8H2-0002jv-Au for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jul 2005 07:53:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dr8IU-0007RJ-6C for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Jul 2005 01:54:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dr8Ho-0007Dh-CK for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2005 01:54:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dr8Hc-00078G-WF for bug-gnu-emacs@gnu.org; Sat, 09 Jul 2005 01:53:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dr8Hb-00077A-Rt; Sat, 09 Jul 2005 01:53:47 -0400 Original-Received: from [202.41.87.4] (helo=mail.mri.ernet.in) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dr8DB-0007Es-Of; Sat, 09 Jul 2005 01:49:15 -0400 Original-Received: from ipc2.mri.ernet.in (internalmail.office.hri [192.168.1.9]) by mail.mri.ernet.in (Postfix) with ESMTP id B33F78523C; Sat, 9 Jul 2005 16:33:56 +0500 (MVT) Original-Received: from ipc2 (localhost [127.0.0.1]) by ipc2 (Postfix) with SMTP id EDD5FAD23; Sat, 9 Jul 2005 11:12:07 +0530 (IST) Original-Received: from riemann.mri.ernet.in (riemann.mri.ernet.in [192.168.3.122]) by ipc2.mri.ernet.in (Postfix) with ESMTP id BB4BB1B68; Sat, 9 Jul 2005 11:12:07 +0530 (IST) Original-Received: from riemann.mri.ernet.in (localhost [127.0.0.1]) by riemann.mri.ernet.in (8.13.3/8.13.3) with ESMTP id j695hcQn074713; Sat, 9 Jul 2005 11:13:38 +0530 (IST) (envelope-from raghu@riemann.mri.ernet.in) Original-Received: (from raghu@localhost) by riemann.mri.ernet.in (8.13.3/8.13.3/Submit) id j695hcvX074710; Sat, 9 Jul 2005 11:13:38 +0530 (IST) (envelope-from raghu) Original-To: bug-gnu-emacs@gnu.org X-Organization: Harish-Chandra Research Institute (HRI) X-Address: Chhatnag Road, Jhusi, Allahabad 211 019, India X-URL: http://www.mri.ernet.in/ X-Phone: +91 (532) 2667 509, 2667 318, 2667 578, 2567 746, 2567 747 X-Fax: +91 (532) 2667 576, 2567 748, 2567 444, 2568 036 X-OpenPGP-Key-ID: 0x03618806 X-OpenPGP-Key-Fingerprint: C75D D0AF 457E 7454 BEC2 37AD C6E1 0407 0361 8806 X-OpenPGP-Public-Key-Available-At: http://www.keyserver.net/ Original-Lines: 78 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 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:12438 gmane.emacs.pretest.bugs:8393 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:12438 This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.3.1 (i386--freebsd, X toolkit, Xaw3d scroll bars) of 2005-07-02 on riemann.mri.ernet.in configured using `configure --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include --prefix=/usr/local i386--freebsd' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil locale-coding-system: nil default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: The form (timezone-parse-date "Fri, 17 Mar 89 4:01:33") evaluates to the vector ["1989" "3" "17" "4:01:3" "3"] The documentation for the function says "Parse DATE and return a vector [YEAR MONTH DAY TIME TIMEZONE]. ... TIMEZONE is nil for DATEs without a zone field." Therefore, the last element of the above vector should be `nil'. As I understand, the problem is caused by the first regular expression in the `cond' expression in `timezone-parse-date'. The following patch seems to solve the problem: ---------------------------------------------------------------------- diff -ruN emacs/lisp/timezone.el emacs-new/lisp/timezone.el --- emacs/lisp/timezone.el Fri Jul 8 16:54:48 2005 +++ emacs-new/lisp/timezone.el Fri Jul 8 16:56:05 2005 @@ -149,7 +149,7 @@ (time nil) (zone nil)) ;This may be nil. (cond ((string-match - "\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]*\\([-+a-zA-Z0-9]+\\)" date) + "\\([0-9]+\\)[ \t]+\\([^ \t,]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\([0-9]+:[0-9:]+\\)[ \t]+\\([-+a-zA-Z0-9]+\\)" date) ;; Styles: (1) and (2) with timezone and buggy timezone ;; This is most common in mail and news, ;; so it is worth trying first. ---------------------------------------------------------------------- Here is the change log entry, in case the above change is used: ---------------------------------------------------------------------- 2005-07-09 N. Raghavendra * timezone.el (timezone-parse-date): Changed the first regexp in the `cond' expression. ---------------------------------------------------------------------- I use Emacs 21.3, but I notice that the regexp is the same in the CVS version. Therefore, I am sending a copy of this message to `emacs-pretest-bug@gnu.org' too. Raghavendra. -- N. Raghavendra | See message headers for contact Harish-Chandra Research Institute | and OpenPGP details.