feat: disable one year limit when importing dates
addresses #8698gjh5u
This commit is contained in:
@@ -280,14 +280,14 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
|
|||||||
protected function parseDates(\SimpleXMLElement $xmlDate, array $product): int
|
protected function parseDates(\SimpleXMLElement $xmlDate, array $product): int
|
||||||
{
|
{
|
||||||
$dateCount = 0;
|
$dateCount = 0;
|
||||||
$earliestDate = new \DateTimeImmutable('next year');
|
// $earliestDate = new \DateTimeImmutable('next year');
|
||||||
|
|
||||||
foreach ($xmlDate->hotel as $xmlHotel) {
|
foreach ($xmlDate->hotel as $xmlHotel) {
|
||||||
// don't import dates starting later than one year from now
|
// don't import dates starting later than one year from now
|
||||||
$dateStart = \DateTime::createFromFormat('d.m.Y', (string) $xmlDate->attributes()['termin']);
|
// $dateStart = \DateTime::createFromFormat('d.m.Y', (string) $xmlDate->attributes()['termin']);
|
||||||
if ($dateStart > $earliestDate) {
|
// if ($dateStart > $earliestDate) {
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
|
|
||||||
$date = $this->createDateRecord($product, $xmlDate);
|
$date = $this->createDateRecord($product, $xmlDate);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user