Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Parse date
<?php
$str = "Mon Aug 06 00:00:00 BST 2012";
$d = strtotime("$str");
echo date("Y-m-d H:i", $d);
// 2012-08-06 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment