title: Why this datetime to timestamp convertion in PHP doesn't work?
body: <p>I want to convert this format of datetime "31-12-2018 19:30 hs." from Argentina to an UTC timestamp, I am using the following code:</p>
  
  <pre><code>$clean_date = substr($date, 0, -4);
  $dt = new DateTime($clean_date, new DateTimeZone('America/Argentina/Buenos_Aires'));
  $dt-&gt;setTimeZone(new DateTimeZone('UTC'));
  $timestamp = $dt-&gt;getTimestamp();
  </code></pre>
  
  <p>But it doesn't work, in the database the record is "0000-00-00 00:00:00", but if I echo the $dt, till there is working perfectly and showing the datetime in UTC.</p>
  
  <p>Could someone please help me?
  Thanks.</p>