-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
3.5.5, 3.6.5, 3.7, 3.8, 4.0
-
MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_400_STABLE
-
-
7
Activity start dates and due dates are being shifted by (+/-)1 hour during backup and restore.
This happens when we have an overlap of DST and Standard time. Moodle calculates the date offset by subtracting the original course start date to the new course start date on restore.
For example:
Original course start date: July 15, 2019 12 AM (AEST) = 1563112800
Setting (The new course start date): September 30, 2019 12 AM (AEST) = 1569765600
Offset = Setting - Original
Offset = 6652800
So if we have an assignment start date:
Assignment (original start date): July 16, 12 AM (AEST)= 1563199200
the new assignment start date on restore will be:
July 16, 12 AM (1563199200) + Offset(6652800) = Oct 1, 12 AM (1569852000)
Assignment (original due date): July 23, 11 PM (AEST) = 1563886800
the new assignment due date on restore will be:
July 23, 11 PM (1563886800) + Offset(6652800) = Oct 9, 12 AM (1570539600)
Notice that the time changed from 11 PM to 12 AM because Daylight saving time started on October 6, 2019 2 AM (AEDT).
Please see the attached files for more examples
Steps to replicate:
Replicate subtracting 1 hour on startdate and/or duedate:
- Use the attached course backup
- Restore the course on course start date March 23, 2020 (DST)
- Notice that when DST ends (on 5 April 2020, 3:00:00 am), the activity deadline is changed from 11 PM to 10 PM
Replicate adding 1 hour on startdate and/or duedate:
- Use the attached course backup
- Restore the course on course start date Sept 30, 2019 (Standard time)
- Notice that when DST starts (on 6 October 2019, 2:00:00 am), the activity startdate changed from 12 AM to 1AM and the deadline changed from 11 PM to 12 AM
- has been marked as being related by
-
MDL-17672 Incorrect time shift for recurring events over Daylight Savings Time -> Standard Time change
-
- Closed
-
- is duplicated by
-
MDL-66556 Time changes after Daylight Saving Time starts or ends
-
- Closed
-
- will help resolve
-
MDL-66716 Timeline block shows incorrect date of due items
-
- Closed
-