title: PHP DateTime failing to convert Amazon shipping date
body: <p>I've realised my DateTime function is not converting and returning false.</p>
  <p>Example date/time as provided by Amazon. This is what I am trying to convert from:<br />
  <code>2020-07-28T23:00:00Z</code></p>
  <p><strong>Function which accepts the date as provided by Amazon and tries to convert it.</strong></p>
  <pre><code>protected function dateUtcToEuropeLondon($date)
  {
      try {
          $dt = new DateTime($date, new DateTimeZone('UTC'));
          $dt-&gt;setTimezone(new DateTimeZone('Europe/London'));
  
          return $dt;
      } catch (Exception $e) {
          return false;
      }
  }
  </code></pre>
  <p><strong>Full function.</strong></p>
  <pre><code>// Detect if custom shipping date exists
  $date = (isset($order_details-&gt;EarliestShipDate)) ? $order_details-&gt;EarliestShipDate : '';
  
  // Set custom meta field so we can easily access it via WC_Order
  if (!empty($date)) {
      $date = $this-&gt;dateUtcToEuropeLondon(strtotime($date));
      
      if ($date instanceof DateTime) {
          update_post_meta($order_id, '_wpl_shipping_date', $date-&gt;format('Y-m-d\TH:i:s'));
      }
  }
  </code></pre>
  <p>For starters, I checked what value I got back from:<br />
  <code>$date = $this-&gt;dateUtcToEuropeLondon(strtotime('2020-07-28T23:00:00Z'));</code><br />
  it was nothing: <code>''</code>.</p>