CDB cat dog-egories:
      

December 04, 2003

Note: CogDogBlog has a new WordPress powered home at http://cogdogblog.com/. All entries from this version have been moved there, so as a guide dog service try finding this article in its new home by title search.

RSS2JS Update: Date Posted Fix and Future Attractions

Yet another small fix to our RSS to Javascript tool-- there was a flaw in (my) program logic so that the item posting dates from RSS2.0 feeds were not being converted correctly from their GMT+0 values.

If you have a version of this running, you can make a direct edit to both the rss2js.php and the rss2html.php scripts.

Change the code starting at line 209 from:

// format: "Day, dd Mmm yyyy hh:mm:ss-xx"
$nix_date = substr($item->pubDate, 0, 24);

to read:

// format: "Day, dd Mmm yyyy hh:mm:ss-xx"
$nix_date = $item->pubDate;

PHP needs the whole date string to convert it from the GMT+0 to a local time value in unix time stamp format, which is eventually converetd to the pretty formatted output string.

Also, in the news, as many have written, the ReadingEd site is gone, 404 that had hosted the OnyxRSS PHP parser code. I've been in contact with Ed (who is a student) who shared that he has moved on to other interests and let the site go. He is going to send a copy of the documentation which was formerlly on his site, and says it is fine to use the library code, which works well with RSS 0.90 - 2.0.

On the horizon, and over the winter break maybe, I plan to redesign the main site for this tool as it has sprawled to a scrolling nightmare, and hopefully provide a bit more useful information for those trying to use it.

The code has seemed to spread a bit, 36 instances spotted via Google with versions in Norwegian, Portuguese, German, and Arabic.

blogged December 4, 2003 09:10 AM :: category [ rss ]
Comments About "RSS2JS Update: Date Posted Fix and Future Attractions"
RSS Feed for comments on this entry
RSS Feed for all CDB comments
 

Thanks again Alan!

Commented by: Richard on December 8, 2003 02:16 PM

Spammers Have Force Our Hands...
spamroach.jpg
Note: Those nasty blog-spamming roaches have forced us to take action to prevent their spread- all entries made to this blog will remain open for comments for 30 days after the original posting date. After that, it is old news anyhow, correct?

If you really need to make contact with the chief dog around here, please submit a request via our feedback center