From 5e2eef97f0e3dc60f9176e33b2c16a15ea19dc8d Mon Sep 17 00:00:00 2001 From: Magdalena Holczik Date: Mon, 2 Dec 2024 11:28:51 +0100 Subject: [PATCH] Bugfix: cancel until midnight correctly (#714) (partially revert fd813848b45d9fe28daf755d4df75a64b8b312be) --- classes/booking_option.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/booking_option.php b/classes/booking_option.php index 64f2ba865..dad4b7647 100755 --- a/classes/booking_option.php +++ b/classes/booking_option.php @@ -3125,7 +3125,8 @@ public static function return_cancel_until_date($optionid) { $allowupdatedays--; // We set 00:00 of the previous day. $datestring = "midnight - $allowupdatedays days"; } else { - $allowupdatedays = abs($allowupdatedays); // We set 00:00 of the next day. + $allowupdatedays++; // We set 00:00 of the next day. + $allowupdatedays = abs($allowupdatedays); $datestring = "midnight + $allowupdatedays days"; } $canceluntil = strtotime($datestring, $starttime);