title: Yii2 View DateTime Format (d-m-Y H:i:s) But When Save/update in DB Change format to Y-m-d H:i:s
body: <p>I'm Using Kartik DateTimePicker Extension</p>
  
  <pre><code>&lt;?= $form-&gt;field($model, 'Created')-&gt;widget(DateTimePicker::classname(),[
          'model' =&gt; $model,
          'attribute' =&gt; 'Created',
          'name' =&gt; 'Created',
          'options' =&gt; ['placeholder' =&gt; 'Select Created'],
          'pluginOptions' =&gt; [
              'format' =&gt; 'dd-mm-yyyy hh:ii:ss',
              'todayHighlight' =&gt; true
          ]
      ]) 
  ?&gt;
  </code></pre>
  
  <p>User fill the Create Date the format is </p>
  
  <p><strong>d-m-Y H:i:s (like 24-09-2015 11:21:10)</strong></p>
  
  <p>But when record save to database then Create Date Format change to </p>
  
  <p><strong>Y-m-d H:i:s (like 2015-09-24 11:21:10)</strong></p>
  
  <p>How can I change the date format on save/update of record</p>