On Fri, 9 May 2008 15:56:16 -0700 (PDT) Paulo Matos <[EMAIL PROTECTED]> wrote: 

PM> On May 7, 3:05 pm, Ted Zlatanov <[EMAIL PROTECTED]> wrote:
>> On Tue, 6 May 2008 11:55:30 -0700 (PDT) Paulo Matos <[EMAIL PROTECTED]> 
>> wrote:
>> 
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
>> 
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...
>> 
>> 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)?
>> 
>> 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("„

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
<URL:http://www.w3.org/TR/NOTE-datetime>, 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

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
  <URL:http://www.w3.org/TR/NOTE-datetime>, 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
  <URL:http://www.w3.org/TR/NOTE-datetime>, 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
  
_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to