From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: nnrss-normalize-date and timezone-parse-* can't parse Unix epoch time stamps (was: Not representable time) Date: Mon, 12 May 2008 09:32:01 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <863aona90e.fsf_-_@lifelogs.com> References: <86skwuw6od.fsf@lifelogs.com> <75f770a5-d087-45f3-ad61-0b041fa453fa@34g2000hsh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1210602543 7918 80.91.229.12 (12 May 2008 14:29:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 May 2008 14:29:03 +0000 (UTC) Cc: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 12 16:29:40 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JvZ24-0007er-Ef for ged-emacs-devel@m.gmane.org; Mon, 12 May 2008 16:29:40 +0200 Original-Received: from localhost ([127.0.0.1]:49392 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JvZ1L-0006Yk-Vp for ged-emacs-devel@m.gmane.org; Mon, 12 May 2008 10:28:56 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JvZ1C-0006SA-7H for emacs-devel@gnu.org; Mon, 12 May 2008 10:28:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JvZ1B-0006RO-An for emacs-devel@gnu.org; Mon, 12 May 2008 10:28:45 -0400 Original-Received: from [199.232.76.173] (port=47118 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JvZ1B-0006R3-4A for emacs-devel@gnu.org; Mon, 12 May 2008 10:28:45 -0400 Original-Received: from mail.blockstar.com ([170.224.69.95]:49896) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JvZ19-0007ff-Jl for emacs-devel@gnu.org; Mon, 12 May 2008 10:28:44 -0400 Original-Received: from tzlatanov-ubuntu-desktop.jumptrading.com (unknown [38.98.147.130]) by mail.blockstar.com (Postfix) with ESMTP id 76FB73F8416 for ; Mon, 12 May 2008 07:41:19 -0700 (PDT) X-Hashcash: 1:20:080512:emacs-devel@gnu.org::ApZcPCvB9P7/0c9Y:0000000000000000000000000000000000000000004OtA Original-Newsgroups: gnu.emacs.gnus X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:X/0xhx6J7lwttq31QPsjxL5mxbg= In-Reply-To: <75f770a5-d087-45f3-ad61-0b041fa453fa@34g2000hsh.googlegroups.com> (Paulo Matos's message of "Fri, 9 May 2008 15:56:16 -0700 (PDT)") X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:97024 Archived-At: --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, 9 May 2008 15:56:16 -0700 (PDT) Paulo Matos wr= ote:=20 PM> On May 7, 3:05=A0pm, Ted Zlatanov wrote: >> On Tue, 6 May 2008 11:55:30 -0700 (PDT) Paulo Matos = wrote: >>=20 PM> Hello all, PM> I have added a couple of rss feeds to gnus the last time and now I PM> get: PM> Contacting host:www.techradar.com:80 PM> nnrss-normalize-date: Specified time is not representable >>=20 PM> And then Gnus doesn't start. This is really annoying. What can I do to PM> either remove the feed or solve the issue? I need my Gnus back... >>=20 >> Can you provide the backtrace (do M-x toggle-debug-on-error) and the >> address of the RSS feed, plus the specific contents if possible (in case >> they go away meanwhile)? >>=20 >> Ted PM> Here's the trace: PM> Debugger entered--Lisp error: (error "Specified time is not PM> representable") PM> encode-time(0 0 0 1 1 2095) PM> nnrss-normalize-date("1209546525") PM> nnrss-check-group("All Gaming Feeds" "") PM> nnrss-request-group("All Gaming Feeds" "" nil) PM> gnus-activate-group("nnrss:All Gaming Feeds" scan) PM> gnus-get-unread-articles(nil) PM> gnus-setup-news(nil nil nil) PM> byte-code("=AC=D1=0E Hm, the docstring for nnrss-normalize-date says: "Return a date string of DATE in the RFC822 style. This function handles the ISO 8601 date format described in , and also the RFC822 style which RSS 2.0 allows." but what you show is a Unix time stamp, which is not one of those styles. I checked RFC822 and a Unix time stamp is not allowed. It shouldn't break nnrss, though, and we may as well give correct data instead of complaining. The attached patch will let nnrss-normalize-date do the right thing with that header, please try it and let me know if it works. Perhaps it should just call timezone-parse-* functions instead of rolling its own, though. Emacs developers: should timezone-parse-* in timezone.el also handle Unix time stamps? I think it makes sense to add that format. The docs say it's not currently supported. Ted --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=nnrss.unix-date.patch Index: nnrss.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/nnrss.el,v retrieving revision 7.56 diff -c -r7.56 nnrss.el *** nnrss.el 24 Apr 2008 04:19:21 -0000 7.56 --- nnrss.el 12 May 2008 14:20:51 -0000 *************** *** 500,507 **** This function handles the ISO 8601 date format described in , and also the RFC822 style which RSS 2.0 allows." ! (let (case-fold-search vector year month day time zone cts) ! (cond ((null date)) ;; RFC822 ((string-match " [0-9]+ " date) (setq vector (timezone-parse-date date) --- 500,510 ---- This function handles the ISO 8601 date format described in , and also the RFC822 style which RSS 2.0 allows." ! (let (case-fold-search vector year month day time zone cts given) ! (cond ((null date)) ; do nothing for this case ! ;; if the date is just digits (unix time stamp): ! ((string-match "^[0-9]+$" date) ! (setq given (seconds-to-time (string-to-number date)))) ;; RFC822 ((string-match " [0-9]+ " date) (setq vector (timezone-parse-date date) *************** *** 559,565 **** (if zone (concat " " zone) ""))) ! (message-make-date)))) ;;; data functions --- 562,568 ---- (if zone (concat " " zone) ""))) ! (message-make-date given)))) ;;; data functions --=-=-=--