Skip to content

Commit

Permalink
Fixed RSS pubDate field.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 3, 2013
1 parent e1954ad commit f4939b4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion feed/index.php
Expand Up @@ -181,13 +181,16 @@ function recache($subreddit, $fname, $url)
$items = array();
foreach ($feed as $item)
{
$pubdate = $item->pubDate;
$dt = new DateTime("@$pubdate");
$pubdatefmt = $dt->format(DateTime::RSS);
$items[] = array(
guid => $item->id,
title => $item->title,
link => $item->link,
summary => $item->summary,
description => $item->summary,
pubdate => $item->pubDate,
pubdate => $pubdatefmt
);
} // foreach

Expand Down

0 comments on commit f4939b4

Please sign in to comment.