Skip to content

Commit

Permalink
MDL-31348 calendar: event links not using user timezone
Browse files Browse the repository at this point in the history
thanks to Ben Thomas for the patch
  • Loading branch information
danpoltawski authored and stronk7 committed Feb 27, 2012
1 parent 4c5c7b1 commit b4355cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions calendar/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@

// Is used several times, and sometimes with modification if required
$viewcalendarurl = new moodle_url(CALENDAR_URL.'view.php', array('view'=>'upcoming'));
$viewcalendarurl->param('cal_y', date('Y', $event->timestart));
$viewcalendarurl->param('cal_m', date('m', $event->timestart));
$viewcalendarurl->param('cal_y', userdate($event->timestart, '%Y'));
$viewcalendarurl->param('cal_m', userdate($event->timestart, '%m'));

// If confirm is set (PARAM_BOOL) then we have confirmation of initention to delete
if ($confirm) {
Expand Down Expand Up @@ -124,4 +124,4 @@
calendar_print_event($event, false);

echo $OUTPUT->box_end();
echo $OUTPUT->footer();
echo $OUTPUT->footer();
6 changes: 3 additions & 3 deletions calendar/event.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@

$params = array(
'view' => 'day',
'cal_d' => date('j', $event->timestart),
'cal_m' => date('n', $event->timestart),
'cal_y' => date('y', $event->timestart),
'cal_d' => userdate($event->timestart, '%d'),
'cal_m' => userdate($event->timestart, '%m'),
'cal_y' => userdate($event->timestart, '%Y'),
);
$eventurl = new moodle_url('/calendar/view.php', $params);
if (!empty($event->courseid) && $event->courseid != SITEID) {
Expand Down

0 comments on commit b4355cf

Please sign in to comment.