Hello,
I installed phpBB latest version 3.3.4
I submitted the ATOM feed link to site map
But I am getting error because the date format is wrong
How to fix it?
Line 8
Parent tag: feed
Tag: updated
I think that this is the code that cause error, specially the date format:
Code: Select all
$item_row = array(
'author' => ($feed->get('creator') !== null) ? $row[$feed->get('creator')] : '',
'published' => ($published > 0) ? $this->feed_helper->format_date($published) : '',
'updated' => ($updated > 0) ? $this->feed_helper->format_date($updated) : '',
'link' => '',
'title' => censor_text($title),
'category' => ($this->config['feed_item_statistics'] && !empty($row['forum_id'])) ? $board_url . '/viewforum.' . $this->php_ext . '?f=' . $row['forum_id'] : '',
'category_name' => ($this->config['feed_item_statistics'] && isset($row['forum_name'])) ? $row['forum_name'] : '',
'description' => censor_text($this->feed_helper->generate_content($row[$feed->get('text')], $row[$feed->get('bbcode_uid')], $row[$feed->get('bitfield')], $options, $row['forum_id'], ($display_attachments ? $feed->get_attachments($row['post_id']) : array()))),
'statistics' => '',
);
// Adjust items, fill link, etc.
$feed->adjust_item($item_row, $row);
$item_vars[] = $item_row;
$feed_updated_time = max($feed_updated_time, $published, $updated);
}
// If we do not have any items at all, sending the current time is better than sending no time.
if (!$feed_updated_time)
{
$feed_updated_time = time();
}
$feed->close();
Update:
I was able to fix it by changing the line 103 in the following file:
phpbb/feed/helper.php
I changed the line to:
return gmdate("Y-m-d\TH:i:s+00:00", $time + $zone_offset) ;
and its fixed