MDL-31348 calendar: event links not using user timezone

thanks to Ben Thomas for the patch
This commit is contained in:
Dan Poltawski
2012-02-23 14:56:08 +08:00
parent ad5202771a
commit b69337ee63
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -68,8 +68,8 @@ $event->count_repeats();
// 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) {
@@ -124,4 +124,4 @@ $event->time = calendar_format_event_time($event, time(), null, false);
calendar_print_event($event, false);
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
echo $OUTPUT->footer();
+3 -3
View File
@@ -168,9 +168,9 @@ if ($data) {
$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) {