Is there any way I can return a date using PHP that is the same format that Date.UTC(y,m,d) returns?
Here is an example of the format I need:
1274745600000 (Apr 25, 2010)
Is there any way I can return a date using PHP that is the same format that Date.UTC(y,m,d) returns?
Here is an example of the format I need:
1274745600000 (Apr 25, 2010)
PHP:
$date = '13-09-2010 00:00:00';
date_default_timezone_set('UTC');
echo (strtotime($date) * 1000) - (strtotime('02-01-1970 00:00:00') * 1000);
//1286928000000
Javascript:
Date.UTC(2010, 9, 13);
//1286928000000