Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
4820bb617b
8 changed files with 18 additions and 20 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue