mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
A small bugfix/update to work with DST. Before, events starting between 00:00
and 00:59 in the first day of each month were not shown at all with DST on.
This commit is contained in:
parent
0df501d5c7
commit
d3555a2ff5
@ -115,8 +115,10 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
|
||||
}
|
||||
|
||||
// Get the events matching our criteria. Don't forget to offset the timestamps for the user's TZ!
|
||||
// TODO: usertime() doesn't compensate for DST. Thus the line below is wrong.
|
||||
$whereclause = calendar_sql_where(usertime($display->tstart), usertime($display->tend), $users, $groups, $courses);
|
||||
$whereclause = calendar_sql_where(
|
||||
usertime($display->tstart) - dst_offset_on($display->tstart),
|
||||
usertime($display->tend) - dst_offset_on($display->tend),
|
||||
$users, $groups, $courses);
|
||||
|
||||
if($whereclause === false) {
|
||||
$events = array();
|
||||
|
Loading…
x
Reference in New Issue
Block a user