CC-1665: Scheduled stream rebroadcasting and recording

-when editing string should hav 00h 00m format.
This commit is contained in:
Martin Konecny 2012-08-03 16:18:45 -04:00
parent 56961e5f48
commit 183937b8e9

View file

@ -39,7 +39,14 @@ class Application_Model_Webstream{
public function getDefaultLength()
{
return $this->webstream->getDbLength();
$dateString = $this->webstream->getDbLength();
$arr = explode(":", $dateString);
if (count($arr) == 3) {
list($hours, $min, $sec) = $arr;
$di = new DateInterval("PT{$hours}H{$min}M{$sec}S");
return $di->format("%Hh %im");
}
return "";
}
public function getDescription()