From 3a5d82f7a6221df9595bf755ad775c241b3c51cc Mon Sep 17 00:00:00 2001 From: Justin Freeman Date: Mon, 27 Jun 2022 12:04:30 +1000 Subject: [PATCH] SUP-45966 Fixes breaking memberships import due to date being provided in an unexpected format - includes date and time component. --- info.xml | 4 ++-- membershiputils.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/info.xml b/info.xml index dfc6364..2a3f3ce 100644 --- a/info.xml +++ b/info.xml @@ -14,8 +14,8 @@ https://agileware.com.au/contact http://www.gnu.org/licenses/agpl-3.0.html - 2022-06-03 - 1.3.1 + 2022-06-27 + 1.3.2 beta 5.0 diff --git a/membershiputils.php b/membershiputils.php index c6c69c1..015553c 100644 --- a/membershiputils.php +++ b/membershiputils.php @@ -220,6 +220,8 @@ function membershiputils_adjustmembershipenddate($end_date) { // Bizarrely, CiviCRM may pass in end_date in either of these two formats if (strpos($end_date, '-') == FALSE) { $date_format = 'Ymd'; + // Return only the date part of a MySQL datetime value + $end_date = substr($end_date, 0, 8); } else { $date_format = 'Y-m-d';