CC-5627 : Check all Application_Common_DateHelper calculations that use
timezone. * Fixed GetPlayOrderRange to be consistently return everything in UTC. * ApiController liveInfoAction now returns everything consistently in the station timezone. This fixes negative remaining time that could occur in the embeddable JS Airtime widgets if you were logged in to Airtime while you viewed your website. (The widgets display in the browser's local time.) * ScheduleController getCurrentPlaylistAction() returns everything consistently in the user timezone now.
This commit is contained in:
parent
f2fe04ba1d
commit
a96c2551ef
4 changed files with 48 additions and 12 deletions
|
@ -185,6 +185,7 @@ class ApiController extends Zend_Controller_Action
|
|||
}
|
||||
}
|
||||
|
||||
//Used by the SaaS monitoring
|
||||
public function onAirLightAction()
|
||||
{
|
||||
$this->view->layout()->disableLayout();
|
||||
|
@ -286,6 +287,14 @@ class ApiController extends Zend_Controller_Action
|
|||
$next["name"] = htmlspecialchars($next["name"]);
|
||||
}
|
||||
|
||||
//For consistency, all times here are being sent in the station timezone, which
|
||||
//seems to be what we've normalized everything to.
|
||||
|
||||
//Convert the UTC scheduler time ("now") to the station timezone.
|
||||
$result["schedulerTime"] = Application_Common_DateHelper::UTCStringToStationTimezoneString($result["schedulerTime"]);
|
||||
$result["timezone"] = Application_Common_DateHelper::getStationTimezoneAbbreviation();
|
||||
$result["timezoneOffset"] = Application_Common_DateHelper::getStationTimezoneOffset();
|
||||
|
||||
//Convert from UTC to station time for Web Browser.
|
||||
Application_Common_DateHelper::convertTimestamps($result["currentShow"],
|
||||
array("starts", "ends", "start_timestamp", "end_timestamp"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue