Index: view.php =================================================================== RCS file: /cvsroot/moodle/moodle/calendar/view.php,v retrieving revision 1.77.2.6 diff -u -r1.77.2.6 view.php --- view.php 6 May 2007 04:26:40 -0000 1.77.2.6 +++ view.php 28 May 2007 16:13:56 -0000 @@ -338,7 +338,7 @@ $display->tend = mktime(23, 59, 59, $m, $display->maxdays, $y); } - $startwday = gmdate('w', $display->tstart); // $display->tstart is already GMT, so don't use date(): messes with server's TZ + $startwday = dayofweek(1, $m, $y); // Align the starting weekday to fall in our display range if($startwday < $display->minwday) {