PHP Parse ATM Date to Normal Date

netnerds.net has a great post on how to convert an ATOM date to a normal PHP date. I found it very useful as I was trying to do this for my sites www.stormwarriorsmovie.com and www.roguebargains.com and it worked great!

Here’s the code from Chrissy of netnerds.net


$atomdate = '2006-04-22T10:00:00.000Z';

$datetime = strtotime(substr($atomdate, 0, 10) . ' ' . substr($atomdate, 11, 8 ));

print date('m.d.y',$datetime);

?>

Leave a Reply