RFC 3339 date format in RSS Feeds

RSS Feeds use RFC 3339 date format in their XML/Atom feeds.

Date formats have often caused confusion in the development, interoperability and maintenance of software applications. To improve the consistency in use of Date and Time, RFC 3339 came into existence which uses Coordinated Universal Time (UTC).

For PHP versions < 5.2,

$dateRFC = "2008-12-01T13:30:00.000-04:00";
$myDate = date('d.m.Y', strtotime($dateRFC)); // 01.12.2008

For PHP versions >= 5.2,

$dateRFC = "2008-12-01T13:30:00.000-04:00";
$myDate = new DateTime($dateRFC);
$dateStr = date('d.m.Y', strtotime($dateRFC)); // 01.12.2008

Read: IETF: RFC 3339


Written by kurinchilamp

Website: http://

Leave a Reply

Your email address will not be published. Required fields are marked *