Skip to content

Commit

Permalink
SUP-45966 Fixes breaking memberships import due to date being provide…
Browse files Browse the repository at this point in the history
…d in an unexpected format - includes date and time component.
  • Loading branch information
agileware-justin committed Jun 27, 2022
1 parent 4bfcc0b commit 3a5d82f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<url desc="Support">https://agileware.com.au/contact</url>
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
</urls>
<releaseDate>2022-06-03</releaseDate>
<version>1.3.1</version>
<releaseDate>2022-06-27</releaseDate>
<version>1.3.2</version>
<develStage>beta</develStage>
<compatibility>
<ver>5.0</ver>
Expand Down
2 changes: 2 additions & 0 deletions membershiputils.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 3a5d82f

Please sign in to comment.