CC-3066: "Now Playing" Widget doesn't display the currently playing show when it should be

Convert to UTC time before calling model functions
This commit is contained in:
Yuchen Wang 2011-11-21 18:10:29 -05:00
parent ac74ca2449
commit 72553a257d
1 changed files with 3 additions and 3 deletions

View File

@ -180,12 +180,12 @@ class ApiController extends Zend_Controller_Action
$this->_helper->viewRenderer->setNoRender(true); $this->_helper->viewRenderer->setNoRender(true);
$date = new Application_Model_DateHelper; $date = new Application_Model_DateHelper;
$timeNow = $date->getTimestamp(); $utcTimeNow = $date->getUtcTimestamp();
$result = array("env"=>APPLICATION_ENV, $result = array("env"=>APPLICATION_ENV,
"schedulerTime"=>gmdate("Y-m-d H:i:s"), "schedulerTime"=>gmdate("Y-m-d H:i:s"),
"currentShow"=>Application_Model_Show::GetCurrentShow($timeNow), "currentShow"=>Application_Model_Show::GetCurrentShow($utcTimeNow),
"nextShow"=>Application_Model_Show::GetNextShows($timeNow, 5), "nextShow"=>Application_Model_Show::GetNextShows($utcTimeNow, 5),
"timezone"=> date("T"), "timezone"=> date("T"),
"timezoneOffset"=> date("Z")); "timezoneOffset"=> date("Z"));