Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Пробный фикс временной зоны на iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
langovoi committed Oct 12, 2014
1 parent 487145f commit baad7a6
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions controllers/IcsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ public function actionGroup($id)
$schedule_element = $schedule_element_temp;
}
$event = new CalendarEvent();
$event->setStart(new DateTime(date('d.m.Y', $i) . ' ' . $current_call_list[$schedule_element->number]->start_time, new DateTimeZone('Europe/Moscow')));
$event->setEnd(new DateTime(date('d.m.Y', $i) . ' ' . $current_call_list[$schedule_element->number]->end_time, new DateTimeZone('Europe/Moscow')));
$start_time = new DateTime(date('d.m.Y', $i) . ' ' . $current_call_list[$schedule_element->number]->start_time);
$start_time->setTimezone(new DateTimeZone('Europe/Moscow'));
$event->setStart($start_time);
$end_time = new DateTime(date('d.m.Y', $i) . ' ' . $current_call_list[$schedule_element->number]->end_time);
$end_time->setTimezone(new DateTimeZone('Europe/Moscow'));
$event->setEnd($end_time);
$event->setSummary($schedule_element->subject->name);
$event->setUid(md5(date('d.m.Y', $i) . ' ' . $current_call_list[$schedule_element->number]->start_time));
if ($schedule_element->classroom_id || $schedule_element->teacher_id) {
Expand All @@ -89,8 +93,12 @@ public function actionGroup($id)
foreach ($replaces as $schedule_element) {
if ($schedule_element->cancel) continue;
$event = new CalendarEvent();
$event->setStart(new DateTime(date('d.m.Y', $i) . ' ' . $current_call_list[$schedule_element->number]->start_time, new DateTimeZone('Europe/Moscow')));
$event->setEnd(new DateTime(date('d.m.Y', $i) . ' ' . $current_call_list[$schedule_element->number]->end_time, new DateTimeZone('Europe/Moscow')));
$start_time = new DateTime(date('d.m.Y', $i) . ' ' . $current_call_list[$schedule_element->number]->start_time);
$start_time->setTimezone(new DateTimeZone('Europe/Moscow'));
$event->setStart($start_time);
$end_time = new DateTime(date('d.m.Y', $i) . ' ' . $current_call_list[$schedule_element->number]->end_time);
$end_time->setTimezone(new DateTimeZone('Europe/Moscow'));
$event->setEnd($end_time);
$event->setSummary($schedule_element->subject->name);
$event->setUid(md5(date('d.m.Y', $i) . ' ' . $current_call_list[$schedule_element->number]->start_time));
if ($schedule_element->classroom_id || $schedule_element->teacher_id) {
Expand Down

0 comments on commit baad7a6

Please sign in to comment.