Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-66168

Activity start date and due date adds/subtracts 1 hr on backup and restore over DST -> Standard Time change

XMLWordPrintable

    • MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_400_STABLE
    • Hide

      Using the attached course backup:

      Test restore on DST course start date

      1. Restore the course on course start date March 23, 2020 (DST)
      2. Notice that when DST ends (on  5 April 2020, 3:00:00 am), the activity startdate and deadline should be the same as the original (deadline still set to 11 PM)

      Test restore on Standard time course start date

      1. Restore the course on course start date Sept 30, 2019 (Standard time)
      2. Notice that when DST starts (on 6 October 2019, 2:00:00 am), the activity startdate and deadline should be the same as the original (deadline still set to 11 PM)
      Show
      Using the attached course backup: Test restore on DST course start date 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 startdate and deadline should be the same as the original (deadline still set to 11 PM) Test restore on Standard time course start date 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 and deadline should be the same as the original (deadline still set to 11 PM)
    • 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:

      1. Use the attached course backup
      2. Restore the course on course start date March 23, 2020 (DST)
      3. 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:

      1. Use the attached course backup 
      2. Restore the course on course start date Sept 30, 2019 (Standard time)
      3. 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

            Unassigned Unassigned
            trishamilan Trisha Milan
            Brendan Heywood Brendan Heywood
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            19 Vote for this issue
            Watchers:
            26 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.