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

Time changes after Daylight Saving Time starts or ends

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.6.5
    • Assignment, Calendar
    • MOODLE_36_STABLE

      This is an update to https://tracker.moodle.org/browse/MDL-17672

      When you restore a course that has a Start date and other dates set (Assignment Due date, Calendar events, etc.), the times on events will be shifted if Daylight Saving Time occurs during the original or new course.

      I do not like to frivolously declare behaviors as bugs, but as Bruce Webster said on the older issue:

      I'd say having people turn up an hour early / late is a major bug.

      As a thought experiment, forget about Moodle for a moment. If I say that I would like to schedule a recurring meeting at 10 am on Fridays, then I do not intend for that meeting time to change to 9 am or 11 am whenever DST changes one way or the other. It is always 10 am.

      I believe that this happens in Moodle because dates are stored as Unix timestamps, and the relationship of course dates to Start date is computed as a difference of seconds between timestamps. That is, this data type does not care about timezones. I am sure that affords conveniences and simplicity in other contexts, but in this case it causes confusion.

      Steps to reproduce:

      • Create a course in Weekly Format with 3 sections, and a Start date that does not overlap the beginning or end of Daylight Saving Time.
      • Create an assignment in each week, and set the Due dates for 10 am on Friday at the end of each week.
      • Create a calendar event (Course event) for the Saturday at the end of each week.
      • Back up and restore the course, and choose a Start date that would begin before DST, but switch --after the first week.
      • Result: The events and assignments before DST are scheduled for the expected time, but the events and assignments after DST are shifted by 1 hour (exactly as was happening in previous versions).

      Observed behavior: the times for some assignment due dates and calendar events change

      Expected behavior: all of the events in the restored course should be due at 10 am

      Perhaps I just have a very different expectation of how meetings and dates work around DST, so I would love to hear other justifications.

            Unassigned Unassigned
            rhinton Ray Hinton
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 15 minutes
                15m
                Remaining:
                0m
                Logged:
                Time Not Required
                Not Specified

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