CC-3359: Now Playing -> Day view has a bug with supporting UTC time

-fixed
This commit is contained in:
Martin Konecny 2012-02-27 21:37:23 -05:00
parent 02b878561a
commit 4514967ccd

View file

@ -76,9 +76,12 @@ class Application_Model_Nowplaying
$startCutoff = 60; $startCutoff = 60;
$endCutoff = 86400; //60*60*24 - seconds in a day $endCutoff = 86400; //60*60*24 - seconds in a day
} else { } else {
$time = date("H:i:s");
$utcDate = Application_Model_DateHelper::ConvertToUtcDateTimeString($dateString." ".$time);
$date = new Application_Model_DateHelper; $date = new Application_Model_DateHelper;
$time = $date->getTime(); $date->setDate($utcDate);
$date->setDate($dateString." ".$time);
$timeNow = $date->getUtcTimestamp(); $timeNow = $date->getUtcTimestamp();
$startCutoff = $date->getNowDayStartDiff(); $startCutoff = $date->getNowDayStartDiff();
@ -88,6 +91,7 @@ class Application_Model_Nowplaying
$data = array(); $data = array();
$showIds = Application_Model_ShowInstance::GetShowsInstancesIdsInRange($timeNow, $startCutoff, $endCutoff); $showIds = Application_Model_ShowInstance::GetShowsInstancesIdsInRange($timeNow, $startCutoff, $endCutoff);
//get all the pieces to be played between the start cut off and the end cut off. //get all the pieces to be played between the start cut off and the end cut off.
$scheduledItems = Application_Model_Schedule::getScheduleItemsInRange($timeNow, $startCutoff, $endCutoff); $scheduledItems = Application_Model_Schedule::getScheduleItemsInRange($timeNow, $startCutoff, $endCutoff);