CC-5159: Repeating Shows doesn't populate correct dates sometimes

This commit is contained in:
denise 2013-05-17 13:10:15 -04:00
parent 5bf91d513d
commit d57836c42b

View file

@ -878,10 +878,13 @@ SQL;
/* /*
* Make sure start date is less than populate until date AND * Make sure start date is less than populate until date AND
* last show date is null OR start date is less than last show date * last show date is null OR start date is less than last show date
*
* (NOTE: We cannot call getTimestamp() to compare the dates because of
* a PHP 5.3.3 bug with DatePeriod objects - See CC-5159 for more details)
*/ */
if ($utcStartDateTime->getTimestamp() <= $populateUntil->getTimestamp() && if ($utcStartDateTime->format("Y-m-d H:i:s") <= $populateUntil->format("Y-m-d H:i:s") &&
( is_null($utcLastShowDateTime) || ( is_null($utcLastShowDateTime) ||
$utcStartDateTime->getTimestamp() < $utcLastShowDateTime->getTimestamp()) ) { $utcStartDateTime->format("Y-m-d H:i:s") < $utcLastShowDateTime->format("Y-m-d H:i:s")) ) {
/* There may not always be an instance when editing a show /* There may not always be an instance when editing a show
* This will be the case when we are adding a new show day to * This will be the case when we are adding a new show day to