Search code examples
phprsstimestamppubdate

Convert RSS pubDate to a timestamp


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


Solution

  • You can use the built-in function strtotime(). It takes a date string as its first argument and returns a Unix timestamp.

    http://php.net/manual/en/function.strtotime.php