Search code examples
phpdatetimestamprfc1123

Convert RFC 1123 date to timestamp in PHP


What is the easiest or most elegant way to convert a RFC 1123 date (From an HTTP-Expiration-header) to a UNIX timestamp?

Example: Sun, 14 Aug 2005 16:13:03 GMT

Do I really have to 'substr' everything?


Solution

  • strtotime can read that format.