CC-5405: When editing a single show instance from a repeating series, should not create a new cc_show
Refactored cc_show_day->getLocalEndDateAndTime() function
This commit is contained in:
parent
463d286ac5
commit
7f8f084c98
2 changed files with 4 additions and 5 deletions
|
@ -40,8 +40,7 @@ class CcShowDays extends BaseCcShowDays {
|
|||
);
|
||||
|
||||
//set timezone to that of the show
|
||||
$dt->setTimezone(new DateTimeZone($this->getDbTimezone()));
|
||||
|
||||
//$dt->setTimezone(new DateTimeZone($this->getDbTimezone()));
|
||||
return $dt;
|
||||
}
|
||||
|
||||
|
@ -50,9 +49,9 @@ class CcShowDays extends BaseCcShowDays {
|
|||
* Returns the end of a show in the timezone it was created in
|
||||
* @param DateTime $startDateTime first show in show's local time
|
||||
*/
|
||||
public function getLocalEndDateAndTime($showStart)
|
||||
public function getLocalEndDateAndTime()
|
||||
{
|
||||
$startDateTime = clone $showStart;
|
||||
$startDateTime = $this->getLocalStartDateAndTime();
|
||||
$duration = explode(":", $this->getDbDuration());
|
||||
|
||||
return $startDateTime->add(new DateInterval('PT'.$duration[0].'H'.$duration[1].'M'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue