title: Symfony form datetime to return unix timestamp
body: <p>i want  to get the unix time using the symfony form</p>
  
  <p>i tried with :</p>
  
  <pre><code>$form = $this-&gt;createFormBuilder()
          -&gt;add(
              'source','text',array(
                  'attr' =&gt; array('placeholder'=&gt; 'z.B Hamburg',
                      'id'=&gt; 'dirSource'),
                  'label'=&gt; false
              )
          )
          -&gt;add('destination','text',array(
                  'attr' =&gt; array('placeholder'=&gt;'z.B Berlin',
                      'id'=&gt; 'dirDirections'),
                  'label'=&gt; false
              )
          )
          -&gt;add('time', 'datetime', array(
              'input'  =&gt; 'datetime',
              'data' =&gt; date_create(),
              'widget' =&gt; 'choice',
          ))
          -&gt;add('Berechen','submit')
          -&gt;getForm();
      $form-&gt;handleRequest($request);
  
  $url2 = "https://maps.googleapis.com/maps/api/directions/json?origin=Berlin&amp;destination=Hamburg&amp;mode=transit&amp;departure_time=".$timee."&amp;key=" . $key;
  </code></pre>
  
  <p>I want to send the unix timestamp value to the google map.</p>
  
  <p>But it returns array....</p>
  
  <p>in the twig </p>
  
  <pre><code>{{ time|date('U') }}
  </code></pre>
  
  <p>I also tried with <strong><em>strtotime</em></strong> but it returns error</p>