-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
2.7.3
-
None
-
MOODLE_27_STABLE
The mini calendar does not correctly display for the months in which Daylight Savings changes.
For example, for the month of November, the calendar will start at Nov 1, 00:00:00 local time and end Nov 30, 22:59:59 local time.
This is caused by the display->tend calculation which starts with the display->tstart time and adds the number of seconds for the number of calendar days in the month. However, when DST changes in a month, the number of seconds in that month will be off by an hour either direction.
The mini calendar instance of the miscalculation points to a larger problem in moodle for calculating the end of a month. For example, I see this type of logic in calendar\export_execute.php among others.
Succinctly, if the end of a day, month, year is calculated based on the standard length of a day (usually using DAYSECS), then end of the period will be incorrect for any period including a Daylight Savings change.
- duplicates
-
MDL-48591 Mini Calendar Missing "Last Hour of DST Month" Events
-
- Closed
-