set correct duration for subscribing to remote calendar

This commit is contained in:
Julien Fastré 2022-07-06 17:09:04 +02:00
parent 2400bd48d1
commit c8028b8e60

View File

@ -59,7 +59,7 @@ class MapAndSubscribeUserCalendarCommand extends Command
$offset = 0;
/** @var DateInterval $interval the interval before the end of the expiration */
$interval = new DateInterval('P1D');
$expiration = (new DateTimeImmutable('now'))->add(new DateInterval('PT15M'));
$expiration = (new DateTimeImmutable('now'))->add(new DateInterval($input->getOption('subscription-duration')));
$total = $this->userRepository->countByMostOldSubscriptionOrWithoutSubscriptionOrData($interval);
$created = 0;
$renewed = 0;