Unable to store date and timestamp values in mysql
===

I have  date and timestamp fields in mysql table.

    $timeString="Thu Jul 26 22:45:09 +0000 2012";
    
    $time=strtotime($timeString);
    		
    $date=date('Y-m-d', $timeString);


When I execute the query it storing the following values:


date 0000-00-00
time 0000-00-00 00:00:00

Can anyone fix my problem.