From d6ca919aa4b900437b14d3295b6dbf7a8665293c Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Tue, 6 Dec 2016 10:50:09 +0100 Subject: [PATCH] =?UTF-8?q?Traitement=20date=20=C3=A0=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/dataScoring.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/dataScoring.php b/bin/dataScoring.php index 6c3d0de0..5064deec 100644 --- a/bin/dataScoring.php +++ b/bin/dataScoring.php @@ -227,10 +227,14 @@ foreach ($sourcesList as $source => $item) { } continue; } - $calculDate = DateTime::createFromFormat('YmdHis', $survResult->dateUpdate); - $evenDate = DateTime::createFromFormat('YmdHis', $item->dateEven); - if ($evenDate > $calculDate) { + if ($survResult->dateUpdate == '0000-00-00 00:00:00') { $toCalculate = true; + } else { + $calculDate = DateTime::createFromFormat('YmdHis', $survResult->dateUpdate); + $evenDate = DateTime::createFromFormat('YmdHis', $item->dateEven); + if ($evenDate > $calculDate) { + $toCalculate = true; + } } }