diff --git a/public/typo3conf/ext/ep_products/Classes/Service/DateImportService.php b/public/typo3conf/ext/ep_products/Classes/Service/DateImportService.php index 7977df81..7013d14e 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/DateImportService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/DateImportService.php @@ -460,18 +460,20 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface } $timestamp = (string) $attributes['zeit']; $parts = explode(' ', $timestamp); - if (1 === count($parts)) { - [$timePart, ] = $parts; - $pickupTime = sprintf('%s Uhr', substr($timePart, 0, 5)); - } else { + if (2 === count($parts)) { [$datePart, $timePart] = $parts; - $pickupTime = sprintf('%s Uhr (%s)', substr($timePart, 0, 5), $datePart); + } else { + $datePart = null; + [$timePart, ] = $parts; } + $pickupTime = sprintf('%s Uhr', substr($timePart, 0, 5)); + $pickupDate = $datePart; $pickups[] = [ 'city' => $this->pickups[$busProId]['city'], 'street' => $this->pickups[$busProId]['street'], 'price' => (float) str_replace(',', '.', (string) $attributes['preis']), 'time' => $pickupTime, + 'date' => $pickupDate, ]; } $date['pickups'] = serialize($pickups);