From b0dae685508155568935536d3b443403e301c2a7 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 7 Jul 2022 12:10:49 +0000 Subject: [PATCH] Fix broken timezone and end time after import of recurring events --- Classes/Domain/Model/Date.php | 12 ++--- .../DatesFactory.php | 44 +++++++++++-------- Documentation/Changelog/2.4.3.rst | 30 +++++++++++++ ...rtDoesntEndUpInEndlessDateCreationTest.csv | 6 +-- .../ImportsAllConfigurationTest.csv | 32 +++++++------- .../Assertions/ImportsExampleAsExpected.csv | 16 +++---- .../ImportsWithoutCategoryIfNotProvided.csv | 16 +++---- .../ImportsWithoutRegionIfNotProvided.csv | 16 +++---- .../DatesFactoryTest.php | 32 +++++++------- ext_emconf.php | 2 +- 10 files changed, 122 insertions(+), 84 deletions(-) create mode 100644 Documentation/Changelog/2.4.3.rst diff --git a/Classes/Domain/Model/Date.php b/Classes/Domain/Model/Date.php index a5ff9ec..6c9ebe3 100644 --- a/Classes/Domain/Model/Date.php +++ b/Classes/Domain/Model/Date.php @@ -164,22 +164,22 @@ class Date extends AbstractEntity bool $canceled ): self { return self::createFromDestinationData( - new \DateTime($date['start'], new \DateTimeZone($date['tz'])), - new \DateTime($date['end'], new \DateTimeZone($date['tz'])), + new \DateTimeImmutable($date['start'], new \DateTimeZone($date['tz'])), + new \DateTimeImmutable($date['end'], new \DateTimeZone($date['tz'])), $canceled ); } public static function createFromDestinationData( - \DateTime $start, - \DateTime $end, + \DateTimeImmutable $start, + \DateTimeImmutable $end, bool $canceled ): self { $date = new Date(); $date->setLanguageUid(-1); - $date->setStart($start); - $date->setEnd($end); + $date->setStart(new \DateTime($start->format(\DateTime::W3C), $start->getTimezone())); + $date->setEnd(new \DateTime($end->format(\DateTime::W3C), $end->getTimezone())); if ($canceled) { $date->setCanceled('canceled'); diff --git a/Classes/Service/DestinationDataImportService/DatesFactory.php b/Classes/Service/DestinationDataImportService/DatesFactory.php index b3abcc7..8368dee 100644 --- a/Classes/Service/DestinationDataImportService/DatesFactory.php +++ b/Classes/Service/DestinationDataImportService/DatesFactory.php @@ -121,8 +121,10 @@ class DatesFactory bool $canceled ): \Generator { $today = $this->getToday(); - $start = new \DateTime($date['start'], new \DateTimeZone($date['tz'])); - $until = new \DateTime($date['repeatUntil'], new \DateTimeZone($date['tz'])); + $timeZone = new \DateTimeZone($date['tz']); + $start = new \DateTimeImmutable($date['start'], $timeZone); + $end = new \DateTimeImmutable($date['end'], $timeZone); + $until = new \DateTimeImmutable($date['repeatUntil'], $timeZone); $i = (int) strtotime($start->format('l'), $start->getTimestamp()); while ($i !== 0 && $i <= $until->getTimestamp()) { @@ -131,10 +133,10 @@ class DatesFactory continue; } - yield $this->createDateFromStartAndUntil( - (string) $i, + yield $this->createDateFromStartAndEnd( + $i, $start, - $until, + $end, $canceled ); } @@ -148,38 +150,44 @@ class DatesFactory bool $canceled ): \Generator { $today = $this->getToday(); - $start = new \DateTime($date['start'], new \DateTimeZone($date['tz'])); - $until = new \DateTime($date['repeatUntil'], new \DateTimeZone($date['tz'])); + $timeZone = new \DateTimeZone($date['tz']); + $start = new \DateTimeImmutable($date['start'], $timeZone); + $end = new \DateTimeImmutable($date['end'], $timeZone); + $until = new \DateTimeImmutable($date['repeatUntil'], $timeZone); foreach ($date['weekdays'] as $day) { $i = strtotime($day, $start->getTimestamp()); while ($i !== 0 && $i <= $until->getTimestamp()) { - $timeStampToUse = (string) $i; + $timeStampToUse = $i; $i = strtotime('+1 week', $i); if ($i < $today) { continue; } - yield $this->createDateFromStartAndUntil( + yield $this->createDateFromStartAndEnd( $timeStampToUse, $start, - $until, + $end, $canceled ); } } } - private function createDateFromStartAndUntil( - string $timestamp, - \DateTime $start, - \DateTime $until, + private function createDateFromStartAndEnd( + int $timestamp, + \DateTimeImmutable $start, + \DateTimeImmutable $end, bool $canceled ): Date { - $eventStart = new \DateTime('@' . $timestamp); - $eventStart->setTime((int) $start->format('H'), (int) $start->format('i')); - $eventEnd = new \DateTime('@' . $timestamp); - $eventEnd->setTime((int) $until->format('H'), (int) $until->format('i')); + $eventStart = $start->setTimestamp($timestamp)->setTime( + (int) $start->format('H'), + (int) $start->format('i') + ); + $eventEnd = $end->setTimestamp($timestamp)->setTime( + (int) $end->format('H'), + (int) $end->format('i') + ); return Date::createFromDestinationData( $eventStart, diff --git a/Documentation/Changelog/2.4.3.rst b/Documentation/Changelog/2.4.3.rst new file mode 100644 index 0000000..2067d0b --- /dev/null +++ b/Documentation/Changelog/2.4.3.rst @@ -0,0 +1,30 @@ +2.4.3 +===== + +Breaking +-------- + +Nothing + +Features +-------- + +Nothing + +Fixes +----- + +* Fix broken date creation during import. + The import of recurring dates was broken. + We did not respect the time zone. + And we did not respect the end time, but used the until instead. + +Tasks +----- + +Nothing + +Deprecation +----------- + +Nothing diff --git a/Tests/Functional/Import/DestinationDataTest/Assertions/ImportDoesntEndUpInEndlessDateCreationTest.csv b/Tests/Functional/Import/DestinationDataTest/Assertions/ImportDoesntEndUpInEndlessDateCreationTest.csv index 5e8e1bc..23be474 100644 --- a/Tests/Functional/Import/DestinationDataTest/Assertions/ImportDoesntEndUpInEndlessDateCreationTest.csv +++ b/Tests/Functional/Import/DestinationDataTest/Assertions/ImportDoesntEndUpInEndlessDateCreationTest.csv @@ -9,6 +9,6 @@ Um Voranmeldung unter 03672-486470 oder schillerhaus@rudolstadt.de wird gebeten. Es gilt die 2G-PLUS-Regel.",,"Schillerhaus Rudolstadt","Schillerstraße 25",,"Rudolstadt","07407","Deutschland","http://www.schillerhaus.rudolstadt.de/","+ 49 3672 / 486470",,,,,"50.720971023259","11.335229873657","0","1",,"3","1",,"1", "tx_events_domain_model_date",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"uid","pid","cruser_id","hidden","starttime","endtime","sys_language_uid","l10n_parent","t3ver_oid","t3ver_wsid","t3ver_state","event","start","end","canceled","postponed_date","canceled_link",,,,,,,,,,,,,,,,,,,,,,,,,, -,"1","2","0","0","0","0",-1,0,"0","0","0","1","1656151200","1656172800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"2","2","0","0","0","0",-1,0,"0","0","0","1","1656756000","1656777600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"3","2","0","0","0","0",-1,0,"0","0","0","1","1657360800","1657382400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"1","2","0","0","0","0",-1,0,"0","0","0","1","1656144000","1656165600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"2","2","0","0","0","0",-1,0,"0","0","0","1","1656748800","1656770400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"3","2","0","0","0","0",-1,0,"0","0","0","1","1657353600","1657375200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsAllConfigurationTest.csv b/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsAllConfigurationTest.csv index 478bb20..7cdedaf 100644 --- a/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsAllConfigurationTest.csv +++ b/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsAllConfigurationTest.csv @@ -34,29 +34,29 @@ Es gilt die 2G-PLUS-Regel.",,"Lutherkirche","Caspar-Schulte-Straße",,"Rudolstad ,"uid","pid","cruser_id","hidden","starttime","endtime","sys_language_uid","l10n_parent","t3ver_oid","t3ver_wsid","t3ver_state","event","start","end","canceled","postponed_date","canceled_link",,,,,,,,,,,,,,,,,,,,,,,,,, ,"1","2","0","0","0","0",-1,0,"0","0","0","1","4101372000","4101377400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"2","2","0","0","0","0",-1,0,"0","0","0","2","4101112800","4101118200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"3","2","0","0","0","0",-1,0,"0","0","0","2","4078810800","4078771200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"4","2","0","0","0","0",-1,0,"0","0","0","2","4078897200","4078857600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"3","2","0","0","0","0",-1,0,"0","0","0","2","4078803600","4078810800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"4","2","0","0","0","0",-1,0,"0","0","0","2","4078890000","4078897200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"5","2","0","0","0","0",-1,0,"0","0","0","2","4075020000","4075027200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"6","2","0","0","0","0",-1,0,"0","0","0","3","4099831200","4099834800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"7","2","0","0","0","0",-1,0,"0","0","0","3","4097732400","4097739600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"8","2","0","0","0","0",-1,0,"0","0","0","3","4098337200","4098344400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"9","2","0","0","0","0",-1,0,"0","0","0","3","4098942000","4098949200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"10","2","0","0","0","0",-1,0,"0","0","0","3","4097818800","4097826000","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"11","2","0","0","0","0",-1,0,"0","0","0","3","4098423600","4098430800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"12","2","0","0","0","0",-1,0,"0","0","0","3","4099028400","4099035600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"7","2","0","0","0","0",-1,0,"0","0","0","3","4097728800","4097736000","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"8","2","0","0","0","0",-1,0,"0","0","0","3","4098333600","4098340800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"9","2","0","0","0","0",-1,0,"0","0","0","3","4098938400","4098945600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"10","2","0","0","0","0",-1,0,"0","0","0","3","4097815200","4097822400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"11","2","0","0","0","0",-1,0,"0","0","0","3","4098420000","4098427200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"12","2","0","0","0","0",-1,0,"0","0","0","3","4099024800","4099032000","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"13","2","0","0","0","0",-1,0,"0","0","0","3","4101645600","4101649200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"14","3","0","0","0","0",-1,0,"0","0","0","4","4101372000","4101377400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"15","3","0","0","0","0",-1,0,"0","0","0","5","4101112800","4101118200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"16","3","0","0","0","0",-1,0,"0","0","0","5","4078810800","4078771200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"17","3","0","0","0","0",-1,0,"0","0","0","5","4078897200","4078857600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"16","3","0","0","0","0",-1,0,"0","0","0","5","4078803600","4078810800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"17","3","0","0","0","0",-1,0,"0","0","0","5","4078890000","4078897200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"18","3","0","0","0","0",-1,0,"0","0","0","5","4075020000","4075027200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"19","3","0","0","0","0",-1,0,"0","0","0","6","4099831200","4099834800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"20","3","0","0","0","0",-1,0,"0","0","0","6","4097732400","4097739600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"21","3","0","0","0","0",-1,0,"0","0","0","6","4098337200","4098344400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"22","3","0","0","0","0",-1,0,"0","0","0","6","4098942000","4098949200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"23","3","0","0","0","0",-1,0,"0","0","0","6","4097818800","4097826000","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"24","3","0","0","0","0",-1,0,"0","0","0","6","4098423600","4098430800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"25","3","0","0","0","0",-1,0,"0","0","0","6","4099028400","4099035600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"20","3","0","0","0","0",-1,0,"0","0","0","6","4097728800","4097736000","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"21","3","0","0","0","0",-1,0,"0","0","0","6","4098333600","4098340800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"22","3","0","0","0","0",-1,0,"0","0","0","6","4098938400","4098945600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"23","3","0","0","0","0",-1,0,"0","0","0","6","4097815200","4097822400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"24","3","0","0","0","0",-1,0,"0","0","0","6","4098420000","4098427200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"25","3","0","0","0","0",-1,0,"0","0","0","6","4099024800","4099032000","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"26","3","0","0","0","0",-1,0,"0","0","0","6","4101645600","4101649200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, "sys_category",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"uid","pid","cruser_id","hidden","starttime","endtime","sys_language_uid","l10n_parent","title","items","parent",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsExampleAsExpected.csv b/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsExampleAsExpected.csv index c548149..f9b740b 100644 --- a/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsExampleAsExpected.csv +++ b/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsExampleAsExpected.csv @@ -20,16 +20,16 @@ Es gilt die 2G-PLUS-Regel.",,"Lutherkirche","Caspar-Schulte-Straße",,"Rudolstad ,"uid","pid","cruser_id","hidden","starttime","endtime","sys_language_uid","l10n_parent","t3ver_oid","t3ver_wsid","t3ver_state","event","start","end","canceled","postponed_date","canceled_link",,,,,,,,,,,,,,,,,,,,,,,,,, ,"1","2","0","0","0","0",-1,0,"0","0","0","1","4101372000","4101377400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"2","2","0","0","0","0",-1,0,"0","0","0","2","4101112800","4101118200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"3","2","0","0","0","0",-1,0,"0","0","0","2","4078810800","4078771200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"4","2","0","0","0","0",-1,0,"0","0","0","2","4078897200","4078857600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"3","2","0","0","0","0",-1,0,"0","0","0","2","4078803600","4078810800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"4","2","0","0","0","0",-1,0,"0","0","0","2","4078890000","4078897200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"5","2","0","0","0","0",-1,0,"0","0","0","2","4075020000","4075027200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"6","2","0","0","0","0",-1,0,"0","0","0","3","4099831200","4099834800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"7","2","0","0","0","0",-1,0,"0","0","0","3","4097732400","4097739600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"8","2","0","0","0","0",-1,0,"0","0","0","3","4098337200","4098344400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"9","2","0","0","0","0",-1,0,"0","0","0","3","4098942000","4098949200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"10","2","0","0","0","0",-1,0,"0","0","0","3","4097818800","4097826000","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"11","2","0","0","0","0",-1,0,"0","0","0","3","4098423600","4098430800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"12","2","0","0","0","0",-1,0,"0","0","0","3","4099028400","4099035600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"7","2","0","0","0","0",-1,0,"0","0","0","3","4097728800","4097736000","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"8","2","0","0","0","0",-1,0,"0","0","0","3","4098333600","4098340800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"9","2","0","0","0","0",-1,0,"0","0","0","3","4098938400","4098945600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"10","2","0","0","0","0",-1,0,"0","0","0","3","4097815200","4097822400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"11","2","0","0","0","0",-1,0,"0","0","0","3","4098420000","4098427200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"12","2","0","0","0","0",-1,0,"0","0","0","3","4099024800","4099032000","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"13","2","0","0","0","0",-1,0,"0","0","0","3","4101645600","4101649200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, "sys_category",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"uid","pid","cruser_id","hidden","starttime","endtime","sys_language_uid","l10n_parent","title","items","parent",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsWithoutCategoryIfNotProvided.csv b/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsWithoutCategoryIfNotProvided.csv index 9b5f4d0..a63ea9b 100644 --- a/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsWithoutCategoryIfNotProvided.csv +++ b/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsWithoutCategoryIfNotProvided.csv @@ -20,14 +20,14 @@ Es gilt die 2G-PLUS-Regel.",,"Lutherkirche","Caspar-Schulte-Straße",,"Rudolstad ,"uid","pid","cruser_id","hidden","starttime","endtime","sys_language_uid","l10n_parent","t3ver_oid","t3ver_wsid","t3ver_state","event","start","end","canceled","postponed_date","canceled_link",,,,,,,,,,,,,,,,,,,,,,,,,, ,"1","2","0","0","0","0",-1,0,"0","0","0","1","4101372000","4101377400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"2","2","0","0","0","0",-1,0,"0","0","0","2","4101112800","4101118200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"3","2","0","0","0","0",-1,0,"0","0","0","2","4078810800","4078771200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"4","2","0","0","0","0",-1,0,"0","0","0","2","4078897200","4078857600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"3","2","0","0","0","0",-1,0,"0","0","0","2","4078803600","4078810800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"4","2","0","0","0","0",-1,0,"0","0","0","2","4078890000","4078897200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"5","2","0","0","0","0",-1,0,"0","0","0","2","4075020000","4075027200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"6","2","0","0","0","0",-1,0,"0","0","0","3","4099831200","4099834800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"7","2","0","0","0","0",-1,0,"0","0","0","3","4097732400","4097739600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"8","2","0","0","0","0",-1,0,"0","0","0","3","4098337200","4098344400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"9","2","0","0","0","0",-1,0,"0","0","0","3","4098942000","4098949200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"10","2","0","0","0","0",-1,0,"0","0","0","3","4097818800","4097826000","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"11","2","0","0","0","0",-1,0,"0","0","0","3","4098423600","4098430800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"12","2","0","0","0","0",-1,0,"0","0","0","3","4099028400","4099035600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"7","2","0","0","0","0",-1,0,"0","0","0","3","4097728800","4097736000","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"8","2","0","0","0","0",-1,0,"0","0","0","3","4098333600","4098340800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"9","2","0","0","0","0",-1,0,"0","0","0","3","4098938400","4098945600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"10","2","0","0","0","0",-1,0,"0","0","0","3","4097815200","4097822400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"11","2","0","0","0","0",-1,0,"0","0","0","3","4098420000","4098427200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"12","2","0","0","0","0",-1,0,"0","0","0","3","4099024800","4099032000","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"13","2","0","0","0","0",-1,0,"0","0","0","3","4101645600","4101649200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsWithoutRegionIfNotProvided.csv b/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsWithoutRegionIfNotProvided.csv index 4ad3361..0d0c441 100644 --- a/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsWithoutRegionIfNotProvided.csv +++ b/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsWithoutRegionIfNotProvided.csv @@ -20,16 +20,16 @@ Es gilt die 2G-PLUS-Regel.",,"Lutherkirche","Caspar-Schulte-Straße",,"Rudolstad ,"uid","pid","cruser_id","hidden","starttime","endtime","sys_language_uid","l10n_parent","t3ver_oid","t3ver_wsid","t3ver_state","event","start","end","canceled","postponed_date","canceled_link",,,,,,,,,,,,,,,,,,,,,,,,,, ,"1","2","0","0","0","0",-1,0,"0","0","0","1","4101372000","4101377400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"2","2","0","0","0","0",-1,0,"0","0","0","2","4101112800","4101118200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"3","2","0","0","0","0",-1,0,"0","0","0","2","4078810800","4078771200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"4","2","0","0","0","0",-1,0,"0","0","0","2","4078897200","4078857600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"3","2","0","0","0","0",-1,0,"0","0","0","2","4078803600","4078810800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"4","2","0","0","0","0",-1,0,"0","0","0","2","4078890000","4078897200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"5","2","0","0","0","0",-1,0,"0","0","0","2","4075020000","4075027200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"6","2","0","0","0","0",-1,0,"0","0","0","3","4099831200","4099834800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"7","2","0","0","0","0",-1,0,"0","0","0","3","4097732400","4097739600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"8","2","0","0","0","0",-1,0,"0","0","0","3","4098337200","4098344400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"9","2","0","0","0","0",-1,0,"0","0","0","3","4098942000","4098949200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"10","2","0","0","0","0",-1,0,"0","0","0","3","4097818800","4097826000","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"11","2","0","0","0","0",-1,0,"0","0","0","3","4098423600","4098430800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, -,"12","2","0","0","0","0",-1,0,"0","0","0","3","4099028400","4099035600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"7","2","0","0","0","0",-1,0,"0","0","0","3","4097728800","4097736000","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"8","2","0","0","0","0",-1,0,"0","0","0","3","4098333600","4098340800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"9","2","0","0","0","0",-1,0,"0","0","0","3","4098938400","4098945600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"10","2","0","0","0","0",-1,0,"0","0","0","3","4097815200","4097822400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"11","2","0","0","0","0",-1,0,"0","0","0","3","4098420000","4098427200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, +,"12","2","0","0","0","0",-1,0,"0","0","0","3","4099024800","4099032000","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"13","2","0","0","0","0",-1,0,"0","0","0","3","4101645600","4101649200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,, "sys_category",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"uid","pid","cruser_id","hidden","starttime","endtime","sys_language_uid","l10n_parent","title","items","parent",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/Tests/Unit/Service/DestinationDataImportService/DatesFactoryTest.php b/Tests/Unit/Service/DestinationDataImportService/DatesFactoryTest.php index 7dc295e..30b7b31 100644 --- a/Tests/Unit/Service/DestinationDataImportService/DatesFactoryTest.php +++ b/Tests/Unit/Service/DestinationDataImportService/DatesFactoryTest.php @@ -152,12 +152,12 @@ class DatesFactoryTest extends TestCase self::assertCount(3, $result); self::assertInstanceOf(Date::class, $result[0]); - self::assertSame('4078828800', $result[0]->getStart()->format('U')); - self::assertSame('4078836000', $result[0]->getEnd()->format('U')); + self::assertSame('4078821600', $result[0]->getStart()->format('U')); + self::assertSame('4078825200', $result[0]->getEnd()->format('U')); self::assertSame('canceled', $result[0]->getCanceled()); - self::assertSame('4079001600', $result[2]->getStart()->format('U')); - self::assertSame('4079008800', $result[2]->getEnd()->format('U')); + self::assertSame('4078994400', $result[2]->getStart()->format('U')); + self::assertSame('4078998000', $result[2]->getEnd()->format('U')); self::assertSame('canceled', $result[2]->getCanceled()); } @@ -187,12 +187,12 @@ class DatesFactoryTest extends TestCase self::assertCount(3, $result); self::assertInstanceOf(Date::class, $result[0]); - self::assertSame('4078828800', $result[0]->getStart()->format('U')); - self::assertSame('4078836000', $result[0]->getEnd()->format('U')); + self::assertSame('4078821600', $result[0]->getStart()->format('U')); + self::assertSame('4078825200', $result[0]->getEnd()->format('U')); self::assertSame('no', $result[0]->getCanceled()); - self::assertSame('4079001600', $result[2]->getStart()->format('U')); - self::assertSame('4079008800', $result[2]->getEnd()->format('U')); + self::assertSame('4078994400', $result[2]->getStart()->format('U')); + self::assertSame('4078998000', $result[2]->getEnd()->format('U')); self::assertSame('no', $result[2]->getCanceled()); } @@ -226,12 +226,12 @@ class DatesFactoryTest extends TestCase self::assertCount(4, $result); self::assertInstanceOf(Date::class, $result[0]); - self::assertSame('4076564400', $result[0]->getStart()->format('U')); - self::assertSame('4076571600', $result[0]->getEnd()->format('U')); + self::assertSame('4076560800', $result[0]->getStart()->format('U')); + self::assertSame('4076568000', $result[0]->getEnd()->format('U')); self::assertSame('canceled', $result[0]->getCanceled()); - self::assertSame('4077255600', $result[3]->getStart()->format('U')); - self::assertSame('4077262800', $result[3]->getEnd()->format('U')); + self::assertSame('4077252000', $result[3]->getStart()->format('U')); + self::assertSame('4077259200', $result[3]->getEnd()->format('U')); self::assertSame('canceled', $result[3]->getCanceled()); } @@ -265,12 +265,12 @@ class DatesFactoryTest extends TestCase self::assertCount(4, $result); self::assertInstanceOf(Date::class, $result[0]); - self::assertSame('4076564400', $result[0]->getStart()->format('U')); - self::assertSame('4076571600', $result[0]->getEnd()->format('U')); + self::assertSame('4076560800', $result[0]->getStart()->format('U')); + self::assertSame('4076568000', $result[0]->getEnd()->format('U')); self::assertSame('no', $result[0]->getCanceled()); - self::assertSame('4077255600', $result[3]->getStart()->format('U')); - self::assertSame('4077262800', $result[3]->getEnd()->format('U')); + self::assertSame('4077252000', $result[3]->getStart()->format('U')); + self::assertSame('4077259200', $result[3]->getEnd()->format('U')); self::assertSame('no', $result[3]->getCanceled()); } diff --git a/ext_emconf.php b/ext_emconf.php index 47da7c2..ff2572a 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -9,7 +9,7 @@ $EM_CONF['events'] = [ 'state' => 'alpha', 'createDirs' => '', 'clearCacheOnLoad' => 0, - 'version' => '2.4.2', + 'version' => '2.4.3', 'constraints' => [ 'depends' => [ 'typo3' => '10.4.00-11.5.99',