I have dates stored in a database that seem to be encoded weird. 06-02-2012 is in the database encoded as 1338661020. I figured that out by doing:
$date = new DateTime('@1338661020');
echo $date->format(DATE_ATOM);
How would I convert 06-02-2012 back to 1338661020 in PHP?