code: private function getOrderTime(array $entry)
      {
          $date = array_filter($entry['dates'], function (array $property) {
              return $property['typeId'] === 2;
          });
  
          if (!empty($date)) {
              $date = array_shift($date);
  
              return DateTimeImmutable::createFromFormat(DATE_W3C, $date['date']);
          }
  
          return new DateTimeImmutable();
      }
docs: @param array $entry
  
  @return DateTimeImmutable