I have a date string in PHP, say, $min_date = "2012-03-30"
If I run this date through the javascript Date.UTC function, I get 1333065600000. This is the value I want.
var split_date = min_date.split('-'); Date.UTC(split_date[0],(parseInt(split_date[1])-1),split_date[2]); //gives 1333065600000 I am unable to get this value in PHP.
strtotime($min_date); //gives 1333045800 mktime(23,60,60,intval($split_date[1]),intval($split_date[2]),intval($split_date[0])); //gives 1333132260 How do I get the value from PHP that I get in javascript? I'd rather do this conversion on server side and send it to the client as these dates come in a large array that will be painful to convert on client side.
PS: My server time is set correctly.