I\'m trying to display a datetime from my MySQL database as an iso 8601 formated string with PHP but it\'s coming out wrong.
17 Oct 2008 is coming out as: 1969-12-31
For pre PHP 5:
function iso8601($time=false) { if(!$time) $time=time(); return date("Y-m-d", $time) . 'T' . date("H:i:s", $time) .'+00:00'; }