Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-31348 calendar: event links not using user timezone

thanks to Ben Thomas for the patch
  • Loading branch information...
commit 145d39a35a306bb9fb0a52938630a1f2a65859a4 1 parent 6c200e9
@danpoltawski danpoltawski authored stronk7 committed
Showing with 6 additions and 6 deletions.
  1. +3 −3 calendar/delete.php
  2. +3 −3 calendar/event.php
View
6 calendar/delete.php
@@ -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) {
@@ -124,4 +124,4 @@
calendar_print_event($event, false);
echo $OUTPUT->box_end();
-echo $OUTPUT->footer();
+echo $OUTPUT->footer();
View
6 calendar/event.php
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.