title: PHP date() function inserting zeros into database
body: <p>I have an array like so which has the column names of the table on the left and the associating values on the right.</p>
  
  <pre><code>            $proceduredata = array 
              (
                  'patient_id' =&gt; $patientfk,
                  'name_id' =&gt; $procedurenamefk,
                  'department_id' =&gt; $departmentfk,
                  'dosage_id' =&gt; $dosagefk,
                  'edocument' =&gt; NULL, //not implemented yet
                  'user_id' =&gt; $this-&gt;session-&gt;userdata('userID'),
                  'duration' =&gt; NULL, //not implemented yet
                  'submitted' =&gt; date('d-m-Y H:i:s', now()),
                  'comment' =&gt; NULL, //to be implemented
  
              );
  </code></pre>
  
  <p>This array is then passed into a SQL insert function. The insert works fine but my "Submitted" column is getting values of this only:</p>
  
  <blockquote>
    <p>0000-00-00 00:00:00</p>
  </blockquote>
  
  <p>I made sure the time formats are matching? Is there something I have missed thanks.</p>