emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nnrss-normalize-date and timezone-parse-* can't parse Unix epoch time st


From: Ted Zlatanov
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
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

On Fri, 9 May 2008 15:56:16 -0700 (PDT) Paulo Matos <address@hidden> wrote: 

PM> On May 7, 3:05 pm, Ted Zlatanov <address@hidden> wrote:
>> On Tue, 6 May 2008 11:55:30 -0700 (PDT) Paulo Matos <address@hidden> 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

Attachment: nnrss.unix-date.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]