Convert RSS pubDate to a timestamp

hsz picture hsz · May 26, 2010 · Viewed 27.8k times · Source

How to convert a date string Mon, 24 May 2010 17:54:00 GMT from RSS feed to a timestamp in PHP ?

Answer

Agus Puryanto picture Agus Puryanto · Apr 20, 2011

Try This:

$pubDate = $item->pubDate;
$pubDate = strftime("%Y-%m-%d %H:%M:%S", strtotime($pubDate));