title: Why cant I format date to d-m-Y using CakePHP's accessor
body: <p>I got a problem with accessor on single record/get.</p>
  
  <p>I have date record with value '2015-10-10'.</p>
  
  <pre><code>    //PatientsController.php
      $record = $patients-&gt;find()-&gt;first();
      debug($record-&gt;dob);die;
      //would print 19-10-2016 (today's date)
  </code></pre>
  
  <p>In My Entity/Patient.php
          protected function _getDob( $dob )
          {
              $time = new Time( $dob );
              return $time->i18nFormat('dd-MM-YYY');
          }</p>
  
  <p>If I change <code>$time-&gt;i18nFormat('dd-MM-YYY');</code> to <code>$time-&gt;i18nFormat('YYY-MM-dd');</code> it would show '2015-10-10', which is correct but not the format I want.</p>
  
  <p>The question is, why? </p>
  
  <p>For now, I'm using custom finder and formatResults and change the format to d-m-y</p>
  
  <pre><code>    public function findPatients($query, $options) {
          return $query-&gt;formatResults(function($results) {
              return $results-&gt;map(function($row) {
                  $tgl = new Time( $row['dob'] );
                  $row['dob'] = $tgl-&gt;i18nFormat('dd-MM-YYY');
                  return $row;
              });
          });
      }
  </code></pre>
  
  <p>Still wonder why cant it be formatted in accessor.</p>