From 8c2125984ab893e2d5763772e40adaa1d81d5c5b Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst Date: Mon, 4 Mar 2024 13:08:24 +0100 Subject: [PATCH] Make expiration date in mail match the one displayed in selfservice. Selfservice renders the date without ->endOfDay(). Adding the endOfDay makes the date wrap to the next day when the timezone modifier is applied. More intricate timezone aware handling of this date is thinkable, but this change at least brings both interfaces to use the same algorithm so the output will be the same. --- .../Identity/Service/RegistrationMailService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php index 9a839df00..5fac5c732 100644 --- a/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php +++ b/src/Surfnet/StepupMiddleware/CommandHandlingBundle/Identity/Service/RegistrationMailService.php @@ -227,6 +227,6 @@ private function getExpirationDateOfRegistration(DateTime $date): DateTime { return $date->add( new DateInterval('P14D'), - )->endOfDay(); + ); } }