Removed unnecessary formating when comparing DateTime objects

This commit is contained in:
denise 2013-10-04 09:49:23 -04:00
parent 37a0c271f6
commit 60b4eb5c8a

View file

@ -912,9 +912,8 @@ SQL;
* (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->format("Y-m-d H:i:s") <= $populateUntil->format("Y-m-d H:i:s") &&
( is_null($utcLastShowDateTime) ||
$utcStartDateTime->format("Y-m-d H:i:s") < $utcLastShowDateTime->format("Y-m-d H:i:s")) ) {
if ($utcStartDateTime <= $populateUntil &&
( is_null($utcLastShowDateTime) || $utcStartDateTime < $utcLastShowDateTime) ) {
$lastCreatedShow = clone $utcStartDateTime;
/* There may not always be an instance when editing a show