title: how to convert datetime from mysql to doctrine2 odm in zf2?
body: <p>i used doctrine2 Odm in zf2 but my update query store wrong result of date how i set date format in doctrine2 Odm?
  here is my update query:</p>
  
  <pre><code>if ($this-&gt;getRequest()-&gt;isPost()) {
                  $post = $this-&gt;getRequest()-&gt;getPost();
                  $form-&gt;setInputFilter($form-&gt;getInputFilter());
                  $form-&gt;setData($post);
                  //echo '&lt;pre&gt;';
                  //print_r($post);
                  //die();
                  if($form-&gt;isValid())
                  {
                      $formData=$form-&gt;getData();
                      $update=$dm-&gt;createQueryBuilder('Calendar\Document\Event')
                      -&gt;update()
                      -&gt;field('title')-&gt;set($post['title'])
                      -&gt;field('description')-&gt;set($post['description'])
                      -&gt;field('begin')-&gt;set(date('Y-m-d H:i:s', $post['begin']))
                      -&gt;field('end')-&gt;set(date('Y-m-d H:i:s', $post['end']))
                      -&gt;field('id')-&gt;equals($id)
                      -&gt;getQuery()
                      -&gt;execute();
  
                      return $this-&gt;redirect()-&gt;toRoute('calendar');
                      //return $this-&gt;redirect()-&gt;toRoute('calendar', array('action' =&gt; 'show', 'id' =&gt; $form-&gt;get('calendar_id')-&gt;getValue()));
  
                  }
  </code></pre>
  
  <p>but it stores begin=1970-01-01 05:33:34 and end=1970-01-01 05:33:34,how i store correct date format like 6/19/2014 6:33:00 AM?</p>