mirror of
https://github.com/moodle/moodle.git
synced 2025-03-15 05:00:06 +01:00
Fix for bug 1365:
This one was most insidious. Usually we get bugs that have to do with the user/server timezone interaction, but by now I 've learned to be extra careful about that. This one, however, only had to do with the server's timezone and was 100% certain to happen if you are GMT minus something. Considering that I 'm GMT+2, it went unnoticed. Sorry!
This commit is contained in:
parent
dab9f47075
commit
00341feafb
@ -478,7 +478,7 @@ function calendar_top_controls($type, $data) {
|
||||
if(!isset($data['d'])) {
|
||||
$data['d'] = 1;
|
||||
}
|
||||
$time = calendar_gmmktime_check($data['m'], $data['d'], $data['y']);
|
||||
$time = calendar_mktime_check($data['m'], $data['d'], $data['y']);
|
||||
$date = getdate($time);
|
||||
$data['m'] = $date['mon'];
|
||||
$data['y'] = $date['year'];
|
||||
@ -524,7 +524,6 @@ function calendar_top_controls($type, $data) {
|
||||
break;
|
||||
case 'display':
|
||||
$content .= '<div style="text-align: center;"><a href="'.calendar_get_link_href(CALENDAR_URL.'view.php?view=month&', 1, $data['m'], $data['y']).'">'.strftime(get_string('strftimemonthyear'), $time)."</a></div>\n";
|
||||
|
||||
break;
|
||||
case 'month':
|
||||
list($prevmonth, $prevyear) = calendar_sub_month($data['m'], $data['y']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user