CC-5627 : Check all Application_Common_DateHelper calculations that use timezone.

This commit is contained in:
Naomi 2013-12-11 18:56:19 -05:00
parent e6c971387b
commit 67031a75fe
4 changed files with 18 additions and 134 deletions

View file

@ -998,8 +998,13 @@ SQL;
$datePeriod = $this->getDatePeriod($start, $timezone, $last_show,
$repeatInterval, $populateUntil);
$utcLastShowDateTime = $last_show ?
Application_Common_DateHelper::ConvertToUtcDateTime($last_show, $timezone) : null;
if ($last_show) {
$utcLastShowDateTime = new DateTime($last_show, new DateTimeZone($timezone));
$utcLastShowDateTime->setTimezone(new DateTimeZone("UTC"));
}
else {
$utcLastShowDateTime = null;
}
$previousDate = clone $start;
@ -1093,8 +1098,13 @@ SQL;
$this->repeatType = $showDay->getDbRepeatType();
$utcLastShowDateTime = $last_show ?
Application_Common_DateHelper::ConvertToUtcDateTime($last_show, $timezone) : null;
if ($last_show) {
$utcLastShowDateTime = new DateTime($last_show, new DateTimeZone($timezone));
$utcLastShowDateTime->setTimezone(new DateTimeZone("UTC"));
}
else {
$utcLastShowDateTime = null;
}
while ($start->getTimestamp() < $end->getTimestamp()) {
list($utcStartDateTime, $utcEndDateTime) = $this->createUTCStartEndDateTime(