protected function parseDate($text) { $date = \DateTime::createFromFormat('U e O', $text . ' UTC'); if (!$date instanceof \DateTime) { throw new RuntimeException(sprintf('Unable to convert "%s" to datetime', $text)); } return $date; }