I am trying format a timestamp Sat Sep 02 2017 06:00:00 GMT+0600 (Central Asia Standard Time)
into Y-m-d format.But this is not working i am getting 1970-01-01 as output.
My code:
$date="Sat Sep 02 2017 06:00:00 GMT+0600 (Central Asia Standard Time)";
$date_exist=date('Y-m-d',strtotime($date));
echo $date_exist;