diff --git a/concrete/src/Permission/Duration.php b/concrete/src/Permission/Duration.php
index <HASH>..<HASH> 100644
--- a/concrete/src/Permission/Duration.php
+++ b/concrete/src/Permission/Duration.php
@@ -66,7 +66,7 @@ class Duration extends AbstractRepetition
                 $dateEnd = '';
             } else {
                 $dateEnd = $dateEndDT->format('Y-m-d H:i:s');
-                if ($request->get('pdStartDateAllDayActivate')) {
+                if ($request->get('pdEndDateAllDayActivate')) {
                     // We need to work in the user timezone, otherwise we risk to change the day
                     $dateEnd = $service->toDateTime($dateEnd, 'user', 'system')->format('Y-m-d').' 23:59:59';
                     $pd->setEndDateAllDay(1);
Fix saving "all day" for the final date of permission duration