Use end date to calculate coach end date access see BT#12140

Avoid double api_get_utc_datetime
remotes/angel/1.11.x
jmontoyaa 8 years ago
parent 03a24ebd34
commit b7b6a73ee4
  1. 6
      main/cron/import_csv.php

@ -1457,15 +1457,15 @@ class ImportCsv
$date->sub($interval);
$coachBefore = $date->format('Y-m-d h:i');
$date = new \DateTime($dateStart);
$date = new \DateTime($dateEnd);
$interval = new DateInterval('P'.$this->daysCoachAccessAfterBeginning.'D');
$date->add($interval);
$coachAfter = $date->format('Y-m-d h:i');
$dateStart = api_get_utc_datetime($dateStart);
/*$dateStart = api_get_utc_datetime($dateStart);
$dateEnd = api_get_utc_datetime($dateEnd);
$coachBefore = api_get_utc_datetime($coachBefore);
$coachAfter = api_get_utc_datetime($coachAfter);
$coachAfter = api_get_utc_datetime($coachAfter);*/
if (empty($sessionId)) {
$result = SessionManager::create_session(

Loading…
Cancel
Save