CC-5091: Linked Show: Cannot change the start time ahead

This commit is contained in:
denise 2013-05-08 12:05:45 -04:00
parent 80cdd3f2e2
commit d8ba15fac4
1 changed files with 5 additions and 1 deletions

View File

@ -68,8 +68,12 @@ class Application_Service_SchedulerService
$ccSchedules = CcScheduleQuery::create()
->filterByDbInstanceId($instanceIds, Criteria::IN)
->find();
$interval = new DateInterval("PT".abs($diff)."S");
if ($diff < 0) {
$interval->invert = 1;
}
foreach ($ccSchedules as $ccSchedule) {
$interval = new DateInterval("PT".$diff."S");
$start = new DateTime($ccSchedule->getDbStarts());
$newStart = $start->add($interval);
$end = new DateTime($ccSchedule->getDbEnds());