MDL-46517 calendar: adjust display for DST

Thanks to Jo Matthews for providing a patch
This commit is contained in:
Marina Glancy 2014-10-29 10:30:54 +08:00
parent 91465b5095
commit a0ef87de1f
2 changed files with 6 additions and 6 deletions

View file

@ -498,9 +498,9 @@ class core_calendar_renderer extends plugin_renderer_base {
$weekend = intval($CFG->calendar_weekend);
}
$daytime = $display->tstart - DAYSECS;
$daytime = strtotime('-1 day', $display->tstart);
for ($day = 1; $day <= $display->maxdays; ++$day, ++$dayweek) {
$daytime = $daytime + DAYSECS;
$daytime = strtotime('+1 day', $daytime);
if($dayweek > $display->maxwday) {
// We need to change week (table row)
$table->data[] = $row;