Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
4820bb617b
|
@ -426,7 +426,7 @@ class ApiController extends Zend_Controller_Action
|
|||
$show_inst->setRecordedFile($file_id);
|
||||
$show_name = $show_inst->getName();
|
||||
$show_genre = $show_inst->getGenre();
|
||||
$show_start_time = ConvertToLocalDateTimeString($show_inst->getShowInstanceStart());
|
||||
$show_start_time = Application_Model_DateHelper::ConvertToLocalDateTimeString($show_inst->getShowInstanceStart());
|
||||
|
||||
} catch (Exception $e){
|
||||
//we've reached here probably because the show was
|
||||
|
|
|
@ -112,8 +112,7 @@ class NowplayingController extends Zend_Controller_Action
|
|||
{
|
||||
// unset session
|
||||
Zend_Session::namespaceUnset('referrer');
|
||||
$now = date("Y-m-d H:i:s");
|
||||
Application_Model_Preference::SetRemindMeDate($now);
|
||||
Application_Model_Preference::SetRemindMeDate();
|
||||
die();
|
||||
}
|
||||
|
||||
|
|
|
@ -435,10 +435,11 @@ class ScheduleController extends Zend_Controller_Action
|
|||
|
||||
//convert from UTC to user's timezone for display.
|
||||
$originalDateTime = new DateTime($originalShowStart, new DateTimeZone("UTC"));
|
||||
$timestamp = strtotime(Application_Model_DateHelper::ConvertToLocalDateTimeString($originalDateTime->format("Y-m-d H:i:s")));
|
||||
$originalDateTime->setTimezone(new DateTimeZone(date_default_timezone_get));
|
||||
//$timestamp = Application_Model_DateHelper::ConvertToLocalDateTimeString($originalDateTime->format("Y-m-d H:i:s"));
|
||||
$this->view->additionalShowInfo =
|
||||
"Rebroadcast of show \"$originalShowName\" from "
|
||||
.date("l, F jS", $timestamp)." at ".date("G:i", $timestamp);
|
||||
.$originalDateTime->format("l, F jS")." at ".$originalDateTime->format("G:i");
|
||||
}
|
||||
$this->view->showContent = $show->getShowListContent();
|
||||
$this->view->dialog = $this->view->render('schedule/show-content-dialog.phtml');
|
||||
|
|
|
@ -24,10 +24,7 @@ class Application_Model_DateHelper
|
|||
*/
|
||||
function getUtcTimestamp()
|
||||
{
|
||||
$dateTime = new DateTime("@".$this->_dateTime);
|
||||
$dateTime->setTimezone(new DateTimeZone("UTC"));
|
||||
|
||||
return $dateTime->format("Y-m-d H:i:s");
|
||||
return gmdate("Y-m-d H:i:s", $this->_dateTime);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,7 +33,7 @@ class Application_Model_DateHelper
|
|||
*/
|
||||
function getDate()
|
||||
{
|
||||
return date("Y-m-d", $this->_dateTime);
|
||||
return gmdate("Y-m-d", $this->_dateTime);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,7 +42,7 @@ class Application_Model_DateHelper
|
|||
*/
|
||||
function getTime()
|
||||
{
|
||||
return date("H:i:s", $this->_dateTime);
|
||||
return gmdate("H:i:s", $this->_dateTime);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,7 +50,8 @@ class Application_Model_DateHelper
|
|||
*/
|
||||
function setDate($dateString)
|
||||
{
|
||||
$this->_dateTime = strtotime($dateString);
|
||||
$dateTime = new DateTime($dateString, new DateTimeZone("UTC"));
|
||||
$this->_dateTime = $dateTime->getTimestamp();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -66,7 +64,7 @@ class Application_Model_DateHelper
|
|||
* @return End of day timestamp in local timezone
|
||||
*/
|
||||
function getDayEndTimestamp() {
|
||||
$dateTime = new DateTime($this->getDate());
|
||||
$dateTime = new DateTime($this->getDate(), new DateTimeZone("UTC"));
|
||||
$dateTime->add(new DateInterval('P1D'));
|
||||
return $dateTime->format('Y-m-d H:i:s');
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ class Application_Model_Nowplaying
|
|||
}
|
||||
|
||||
public static function ShouldShowPopUp(){
|
||||
$today = mktime(0, 0, 0, date("m") , date("d"), date("Y"));
|
||||
$today = mktime(0, 0, 0, gmdate("m"), gmdate("d"), gmdate("Y"));
|
||||
$remindDate = Application_Model_Preference::GetRemindMeDate();
|
||||
if($remindDate == NULL || $today >= $remindDate){
|
||||
return true;
|
||||
|
|
|
@ -383,7 +383,7 @@ class Application_Model_Preference
|
|||
$outputArray['NUM_OF_SONGS'] = Application_Model_StoredFile::getFileCount();
|
||||
$outputArray['NUM_OF_PLAYLISTS'] = Application_Model_Playlist::getPlaylistCount();
|
||||
$outputArray['NUM_OF_SCHEDULED_PLAYLISTS'] = Application_Model_Schedule::getSchduledPlaylistCount();
|
||||
$outputArray['NUM_OF_PAST_SHOWS'] = Application_Model_ShowInstance::GetShowInstanceCount(date("Y-m-d H:i:s"));
|
||||
$outputArray['NUM_OF_PAST_SHOWS'] = Application_Model_ShowInstance::GetShowInstanceCount(gmdate("Y-m-d H:i:s"));
|
||||
$outputArray['UNIQUE_ID'] = self::GetUniqueId();
|
||||
$outputArray['SAAS'] = self::GetPlanLevel();
|
||||
$outputArray['INSTALL_METHOD'] = self::GetInstallMethod();
|
||||
|
@ -422,8 +422,8 @@ class Application_Model_Preference
|
|||
}
|
||||
}
|
||||
|
||||
public static function SetRemindMeDate($now){
|
||||
$weekAfter = mktime(0, 0, 0, date("m") , date("d")+7, date("Y"));
|
||||
public static function SetRemindMeDate(){
|
||||
$weekAfter = mktime(0, 0, 0, gmdate("m"), gmdate("d")+7, gmdate("Y"));
|
||||
self::SetValue("remindme", $weekAfter);
|
||||
}
|
||||
|
||||
|
|
|
@ -845,7 +845,7 @@ class Application_Model_Show {
|
|||
//What we are doing here is checking if the show repeats or if
|
||||
//any repeating days have been checked. If not, then by default
|
||||
//the "selected" DOW is the initial day.
|
||||
$startDow = date("w", $utcStartDateTime->getTimestamp());
|
||||
$startDow = gmdate("w", $utcStartDateTime->getTimestamp());
|
||||
if (!$data['add_show_repeats']) {
|
||||
$data['add_show_day_check'] = array($startDow);
|
||||
} else if ($data['add_show_repeats'] && $data['add_show_day_check'] == "") {
|
||||
|
@ -1372,7 +1372,7 @@ class Application_Model_Show {
|
|||
|
||||
$shows = Application_Model_Show::getShows($start, $end);
|
||||
|
||||
$today_timestamp = Application_Model_DateHelper::ConvertToUtcDateTime(date("Y-m-d H:i:s"))->format("Y-m-d H:i:s");
|
||||
$today_timestamp = gmdate("Y-m-d H:i:s");
|
||||
|
||||
foreach ($shows as $show) {
|
||||
$options = array();
|
||||
|
|
|
@ -256,7 +256,7 @@ class Application_Model_ShowInstance {
|
|||
|
||||
$mins = abs($deltaMin%60);
|
||||
|
||||
$today_timestamp = Application_Model_DateHelper::ConvertToUtcDateTime(date("Y-m-d H:i:s"))->format("Y-m-d H:i:s");
|
||||
$today_timestamp = gmdate("Y-m-d H:i:s");
|
||||
$starts = $this->getShowInstanceStart();
|
||||
$ends = $this->getShowInstanceEnd();
|
||||
|
||||
|
|
Loading…
Reference in New Issue