title: Prevent PHP date() from defaulting to 12/31/1969
body: <p>I am using a MySQL database with PHP. I store my date values in the database using the <code>DATETIME</code> field.</p>
  
  <p>I'm using this PHP code to convert inputted dates to the appropriate format for MySQL.</p>
  
  <pre><code>date("Y-m-d H:i:s", strtotime($inputDate))
  </code></pre>
  
  <p>However, whenever a date is invalid, it is placed in the database as <code>1969-12-31 19:00:00</code></p>
  
  <p>Is there a way to default this to <code>0000-00-00 00:00:00</code> ?</p>