aboutsummaryrefslogtreecommitdiffstats
path: root/feed.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-01-03 11:15:32 +0000
committerplegall <plg@piwigo.org>2011-01-03 11:15:32 +0000
commit16a7725982201f3e0115e8842b005f5e9d48a8a2 (patch)
treeb3dff1146127889992b932b074ed3f3fb5a86f16 /feed.php
parentf129c6e1d1d3c956355e032b10eb4dba592e1dab (diff)
bug 2094 fixed: correct date format for feedcreator
git-svn-id: http://piwigo.org/svn/branches/2.1@8451 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'feed.php')
-rw-r--r--feed.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/feed.php b/feed.php
index b499c8296..11151e744 100644
--- a/feed.php
+++ b/feed.php
@@ -38,9 +38,7 @@ include_once(PHPWG_ROOT_PATH.'include/functions_notification.inc.php');
*/
function datetime_to_ts($datetime)
{
- $date = strptime($datetime, '%Y-%m-%d %H:%M:%S');
- return mktime($date['tm_hour'], $date['tm_min'], $date['tm_sec'],
- $date['tm_mon'], $date['tm_mday'], 1900+$date['tm_year']);
+ return strtotime($datetime);
}
/**
@@ -136,7 +134,7 @@ if (!$image_only)
$item->description.= '</ul>';
$item->descriptionHtmlSyndicated = true;
- $item->date = $dbnow;
+ $item->date = ts_to_iso8601(datetime_to_ts($dbnow));
$item->author = $conf['rss_feed_author'];
$item->guid= sprintf('%s', $dbnow);;
@@ -188,7 +186,7 @@ foreach($dates as $date_detail)
$item->descriptionHtmlSyndicated = true;
- $item->date = $date;
+ $item->date = ts_to_iso8601(datetime_to_ts($date));
$item->author = $conf['rss_feed_author'];
$item->guid= sprintf('%s', 'pics-'.$date);;