CC-5323: User's Timezone Can Improperly Edit Show
This commit is contained in:
parent
107263ae20
commit
8ddb2974f1
4 changed files with 19 additions and 15 deletions
|
@ -495,16 +495,15 @@ class Application_Service_ShowFormService
|
|||
* @param $time String
|
||||
* @param $timezone String
|
||||
*/
|
||||
public function localizeDateTime($date, $time, $timezone)
|
||||
public function localizeDateTime($date, $time, $newTimezone, $oldTimezone)
|
||||
{
|
||||
$dt = new DateTime($date." ".$time, new DateTimeZone(
|
||||
$this->ccShow->getFirstCcShowDay()->getDbTimezone()));
|
||||
$dt = new DateTime($date." ".$time, new DateTimeZone($oldTimezone));
|
||||
|
||||
$dt->setTimeZone(new DateTimeZone($timezone));
|
||||
$dt->setTimeZone(new DateTimeZone($newTimezone));
|
||||
|
||||
return array(
|
||||
"date" => $dt->format("Y-m-d"),
|
||||
"time" => $dt->format("h:i")
|
||||
"time" => $dt->format("H:i")
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue