From 5716642c09e2f5cf90cb3f302f20ce7ec6122128 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Tue, 18 May 2021 23:42:10 +0200 Subject: [PATCH] migration from framadate 1 choice name using separator for timeSlices in name --- src/Controller/MigrationController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/MigrationController.php b/src/Controller/MigrationController.php index 7adba90..2c0bae8 100755 --- a/src/Controller/MigrationController.php +++ b/src/Controller/MigrationController.php @@ -97,10 +97,10 @@ class MigrationController extends EmailsController { $moments = explode( ',', $d->moments ); foreach ( $moments as $moment ) { $newChoice = new Choice(); + $dateOfDay = date_create( strtotime( $d->title ) ); $newChoice ->setPoll( $poll ) - ->setDateTime( date_create( strtotime( $d->title ) ) ) - ->setName( $moment ); + ->setName( $dateOfDay->format('y-m-d'). ' >>> ' . $moment ); $pollChoicesOrderedBySlug[ $pollSlug ][] = $newChoice; $poll->addChoice( $newChoice );