Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
merge r8451 from branch 2.1 to trunk
bug 2094 fixed: correct date format for feedcreator



git-svn-id: http://piwigo.org/svn/trunk@8452 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Jan 3, 2011
1 parent 9d48858 commit adf5383
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions feed.php
Expand Up @@ -38,9 +38,7 @@
*/
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);
}

/**
Expand Down Expand Up @@ -136,7 +134,7 @@ function ts_to_iso8601($ts)
$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);;

Expand Down Expand Up @@ -188,7 +186,7 @@ function ts_to_iso8601($ts)

$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);;

Expand Down

0 comments on commit adf5383

Please sign in to comment.