I\'m trying to use strtotime to convert the following date:
07/09/2009 17:01:27
It\'s the Europe/London timezone format for 7th of September
The func
Change /
for -
, seems like PHP gets /
as American format, and -
as European. You can see here:
$date = "06/10/2011 14:28"; // 6 october 2011 2:28 pm
$otherDate = "06-10-2011 14:28"; // 6 october 2011 2:28 pm
echo $stamp = strtotime($date) . "
"; // outputs 1307708880
echo $otherStamp = strtotime($otherDate) . "
"; // outputs 1317904080
echo date("d-m", $stamp); // outputs 10-06
echo date("d-m", $otherStamp); // outputs 06-10
http://www.php.net/manual/es/function.strtotime.php#106043