diff --git a/scripts/majBilansPostes.php b/scripts/majBilansPostes.php index d86f1755..ff599a72 100644 --- a/scripts/majBilansPostes.php +++ b/scripts/majBilansPostes.php @@ -142,11 +142,13 @@ if ($stock) { if ( $lastInsert && intval($nbMois)>0 ) { Zend_Date::setOptions(array('extend_month' => true)); $date = new Zend_Date($lastInsert, 'yyyyMMdd'); - $date->add($nbMois, Zend_Date::MONTH); + $date->setTime('00:00:00') + ->add($nbMois, Zend_Date::MONTH) + ->subSecond(1); $toInsert = $date->toString('yyyy-MM-dd'); - echo date('Y/m/d - H:i:s') ." - jusqu'à : $toInsert".EOL; + echo date('Y/m/d - H:i:s') ." - jusqu'au $toInsert".EOL; } - + exit; if ( $toInsert === null ) { $nbRows=$iDb->select('bilans','DISTINCT siren',"dateInsert>='$lastInsert' $strSirenReprise ORDER BY siren ASC", false, MYSQL_ASSOC, true); } else {