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';