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:
defacer 2004-05-11 07:20:44 +00:00
parent dab9f47075
commit 00341feafb

View File

@ -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&amp;', 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']);