CC-5627 : Check all Application_Common_DateHelper calculations that use timezone.
This commit is contained in:
parent
3d1f0b0d0e
commit
b13d12eaac
4 changed files with 41 additions and 32 deletions
|
@ -68,33 +68,6 @@ class ApiController extends Zend_Controller_Action
|
|||
"version" => Application_Model_Preference::GetAirtimeVersion()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up and send init values used in the Calendar.
|
||||
* This is only being used by schedule.js at the moment.
|
||||
*/
|
||||
public function calendarInitAction()
|
||||
{
|
||||
if (is_null(Zend_Auth::getInstance()->getStorage()->read())) {
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
print _('You are not allowed to access this resource.');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$tz = new DateTimeZone(Application_Model_Preference::GetUserTimezone());
|
||||
$now = new DateTime("now", $tz);
|
||||
|
||||
$this->view->calendarInit = array(
|
||||
"timestamp" => time(),
|
||||
"timezoneOffset" => $now->format("Z"),
|
||||
"timeScale" => Application_Model_Preference::GetCalendarTimeScale(),
|
||||
"timeInterval" => Application_Model_Preference::GetCalendarTimeInterval(),
|
||||
"weekStartDay" => Application_Model_Preference::GetWeekStartDay()
|
||||
);
|
||||
|
||||
$this->_helper->json->sendJson(array());
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows remote client to download requested media file.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue