Traitement date à 0

This commit is contained in:
Michael RICOIS 2016-12-06 10:50:09 +01:00
parent 10dda43a79
commit d6ca919aa4

View File

@ -227,12 +227,16 @@ foreach ($sourcesList as $source => $item) {
} }
continue; continue;
} }
if ($survResult->dateUpdate == '0000-00-00 00:00:00') {
$toCalculate = true;
} else {
$calculDate = DateTime::createFromFormat('YmdHis', $survResult->dateUpdate); $calculDate = DateTime::createFromFormat('YmdHis', $survResult->dateUpdate);
$evenDate = DateTime::createFromFormat('YmdHis', $item->dateEven); $evenDate = DateTime::createFromFormat('YmdHis', $item->dateEven);
if ($evenDate > $calculDate) { if ($evenDate > $calculDate) {
$toCalculate = true; $toCalculate = true;
} }
} }
}
// --- Calcul // --- Calcul
if ($toCalculate) { if ($toCalculate) {