title: php date to sql
body: <p>I want to store php date in sql but it store <code>1970-01-01 05:00:</code> instead of input datetime</p>
  
  <p>This is html form </p>
  
  <pre><code>&lt;input type="datetime" id="eventstart" name="txtEventStart" class="form-control" value="&lt;?php echo date('m/Y/d h:i:s');?&gt;"&gt;
  </code></pre>
  
  <p>when data is sent using post </p>
  
  <pre><code>$date = $this-&gt;input-&gt;post('txtEventStart');
  </code></pre>
  
  <p>I convert string to date format using:</p>
  
  <pre><code>$date2 = date('Y-m-d H:i:s', strtotime($date));
  </code></pre>
  
  <p>It stores <code>'1970-01-01 05:00:00'</code></p>
  
  <p>I want to know what is the correct format for storing such type of date.</p>