CC-3174 : showbuilder

percent calculation for shows was off.
This commit is contained in:
Naomi Aro 2012-03-01 12:13:21 +01:00
parent b7e5bfe4aa
commit f8608f3511
1 changed files with 2 additions and 2 deletions

View File

@ -617,14 +617,14 @@ class Application_Model_ShowInstance {
public function getTimeScheduledSecs() public function getTimeScheduledSecs()
{ {
$time_filled = $this->getTimeScheduled(); $time_filled = $this->getTimeScheduled();
return Application_Model_Schedule::WallTimeToMillisecs($time_filled) / 1000; return Application_Model_Playlist::playlistTimeToSeconds($time_filled);
} }
public function getDurationSecs() public function getDurationSecs()
{ {
$ends = $this->getShowInstanceEnd(null); $ends = $this->getShowInstanceEnd(null);
$starts = $this->getShowInstanceStart(null); $starts = $this->getShowInstanceStart(null);
return $ends->format('U') - $starts->format('U'); return intval($ends->format('U')) - intval($starts->format('U'));
} }
public function getPercentScheduled() public function getPercentScheduled()