Support » Fixing WordPress » Converting RSS feed to vCalendar

  • Hi!
    I’ve come across a script to convert an RSS feed to the vCalendar format (for use in apps like iCal), but it doesn’t seem to be working for the RSS/RSS2 feed generated by WordPress 1.2.
    The script is located at
    The problem is that the date entities (?) are set to a date, and not a particular time, so the posts turn up as all-day entries in iCal. I have tried some of the sample conversions at the above link, and they appear fine, so it’s something in the WP RSS feed that is causing this to happen.
    I had a look at the Slashdot RSS feed (, and compared it to my feed (, and noticed a difference in how the times are recorded.
    In Slashdot, the time/date is “2004-06-08T23:58:00+00:00”, but in the WP feed, it’s “Mon, 07 Jun 2004 02:01:47 +0000”. I’m guessing this is the problem… but I don’t know how to fix it.
    Can anyone offer any advice? Is it possible to change the format of the date in the feed?

Viewing 1 replies (of 1 total)
  • Hmmm… I just looked at the source for wp-rss2.php, and saw this line for the published date:
    <?php echo mysql2date(‘D, d M Y H:i:s +0000’, get_lastpostmodified(‘GMT’), 0); ?>
    If I changed it to this:
    <?php echo mysql2date(‘Y-M-dTH:i:s+0000’, get_lastpostmodified(‘GMT’), 0); ?>
    It would probably work… At least, I hope!

Viewing 1 replies (of 1 total)
  • The topic ‘Converting RSS feed to vCalendar’ is closed to new replies.