Page MenuHomePhabricator

Try to remove wmf_common_date_unix_to_civicrm
Open, Needs TriagePublic2 Estimated Story Points

Description

It looks like an unncessary function eg

$update_params = [
  'next_sched_contribution_date' => wmf_common_date_unix_to_civicrm(strtotime("+" . $recur_record->frequency_interval . " " . $recur_record->frequency_unit, $date)),
  'id' => $recur_record->id,
];
civicrm_api3('ContributionRecur', 'Create', $update_params);

vs

'next_sched_contribution_date' => date('Y-m-d H:i:s', strtotime("+" . $recur_record->frequency_interval . " " . $recur_record->frequency_unit, $date)),

Or in fact civi accepts whatever would be passed to strtotime or in fact in this case civi should be updating the date anyway....