/**
  * Modify the given times via the configuration
  *
  * @param array         $times
  * @param Configuration $configuration
  *
  * @return void
  */
 public function handleConfiguration(array &$times, Configuration $configuration)
 {
     $url = $configuration->getExternalIcsUrl();
     if (!GeneralUtility::isValidUrl($url)) {
         HelperUtility::createFlashMessage('Configuration with invalid ICS URL: ' . $url, 'Index ICS URL', FlashMessage::ERROR);
         return;
     }
     $events = $this->icsReaderService->toArray($url);
     foreach ($events as $event) {
         /** @var $event ICalEvent */
         $startTime = DateTimeUtility::getDaySecondsOfDateTime($event->getStart());
         $endTime = DateTimeUtility::getDaySecondsOfDateTime($event->getEnd());
         if ($endTime === self::DAY_END) {
             $endTime = 0;
         }
         $entry = ['pid' => 0, 'start_date' => $event->getStart(), 'end_date' => $event->getEnd() ?: $event->getStart(), 'start_time' => $startTime, 'end_time' => $endTime, 'all_day' => $endTime === 0];
         $times[] = $entry;
     }
 }