CC-3652: Can't edit current show if it's a single instance
when the timezone is in CEST(prague timezone) - The bug was that it was using local timestamp for the current time. - removed some unnecessary code - changed a variable name to more understandable name.
This commit is contained in:
parent
4527da6cdf
commit
a91785ff42
2 changed files with 29 additions and 38 deletions
|
@ -765,18 +765,19 @@ class ScheduleController extends Zend_Controller_Action
|
|||
|
||||
$show = new Application_Model_Show($data['add_show_id']);
|
||||
$validateStartDate = true;
|
||||
|
||||
if (!array_key_exists('add_show_start_date', $data)){
|
||||
//Changing the start date was disabled, since the
|
||||
//array key does not exist. We need to repopulate this entry from the db.
|
||||
//The start date will be returned in UTC time, so lets convert it to local time.
|
||||
$dt = Application_Common_DateHelper::ConvertToLocalDateTime($show->getStartDate());
|
||||
$startTime = Application_Common_DateHelper::ConvertToLocalDateTime($show->getStartTime());
|
||||
$data['add_show_start_date'] = $dt->format("Y-m-d");
|
||||
$data['add_show_start_time'] = $startTime->format("H:i");
|
||||
|
||||
if (!array_key_exists('add_show_start_time', $data)){
|
||||
$startTime = Application_Common_DateHelper::ConvertToLocalDateTime($show->getStartTime());
|
||||
$data['add_show_start_time'] = $startTime->format("H:i");
|
||||
}
|
||||
$validateStartDate = false;
|
||||
}
|
||||
|
||||
$data['add_show_record'] = $show->isRecorded();
|
||||
|
||||
$success = Application_Model_Schedule::addUpdateShow($data, $this, $validateStartDate);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue