Blog Pile

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.

Profile Picture for Alan Levine aka CogDog
An early 90s builder of the web and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person.

Comments

Comments are closed.