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

Timeline block shows incorrect date of due items

    XMLWordPrintable

Details

    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • MOODLE_310_STABLE
    • master-MDL-66716
    • Hide
      1. Log in as admin.
      2. Go to Admin / Location / Location settings and configure:
        1. timezone = "Australia/Sydney"
        2. forcetimezone = "Users can choose their own timezone"
        3. Save changes (button)
      3. Go to current user (admin) profile, click "Edit profile" and configure:
        1. Timezone = "Server timezone (Australia/Sydney)"
        2. Update profile (button)
      4. Create a course.
      5. Create 8 assignments with due date as folollowing:
      6. Assignment due on 01 Sep 2020 at 09:00 AM
        Assignment due on 01 Sep 2020 at 10:00 AM
        Assignment due on 01 Sep 2020 at 11:30 PM
        Assignment due on 02 Sep 2020 at 00:30 AM
        Assignment due on 01 Nov 2020 at 11:30 PM
        Assignment due on 02 Nov 2020 at 00:30 AM
        Assignment due on 01 May 2021 at 11:30 PM
        Assignment due on 02 May 2021 at 00:30 AM
        

      1. Set system date to `04 Apr 2020 Australia/Sydney timezone` (a day before DST ends). Timezone can be different, but should observe daylight saving time. In further steps Australia/Sydney timezone and its start/end dates will be used.
      2. Enroll your user to the course.
      3. Navigate to dashboard.
      4. Add Timeline block.
      5. Confirm, that all 8 events are aligned to the correct dates.
      6. Set system date to `05 Apr 2020 Australia/Sydney timezone` (the day when DST ends).
      7. Refresh the dashboard page.
      8. Confirm, that all 8 events are aligned to the correct dates.
      9. Set system date to `06 Apr 2020 Australia/Sydney timezone` (a day after DST ends).
      10. Refresh the dashboard page.
      11. Confirm, that 8 events are aligned to the correct dates.
      12. Set system date to `03 Oct 2020 Australia/Sydney timezone` (a day before DST starts).
      13. Refresh the dashboard page.
      14. Confirm, that all 8 events are aligned to the correct dates.
      15. Set system date to `04 Oct 2020 Australia/Sydney timezone` (the day when DST starts).
      16. Refresh the dashboard page.
      17. Confirm, that all 8 events are aligned to the correct dates.
      18. Set system date to `05 Oct 2020 Australia/Sydney timezone` (a day after DST starts).
      19. Refresh the dashboard page.
      20. Confirm, that all 8 events are aligned to the correct dates.
      21. Set system date to current date.
      22. Navigate to Dashboard > Preferences > User account > Edit profile and set your user timezone to "Asia/Magadan" (can be defferent depending on your timezone, but is supposed to be "+1" hour).
      23. Open the dashboard page.
      24. Confirm, that all 8 events were adjusted with regards to new user timezone (eg "Assignment due on 01 Sep 2020 at 09:00 AM" moved to 1 Sep 10 am, "Assignment due on 01 Sep 2020 at 11:30 PM" moved to 2 Sep 00:30 am etc).
      25. Navigate to Dashboard > Preferences > User account > Edit profile and set your user timezone to "Asia/Seoul" (can be defferent depending on your timezone, but is supposed to be "-1" hour).
      26. Open the dashboard page.
      27. Confirm, that all 8 events were adjusted with regards to new user timezone (eg "Assignment due on 01 Sep 2020 at 10:00 AM" moved to 1 Sep 9 am,  "Assignment due on 02 Sep 2020 at 00:30 AM" moved to 1 Sep 11:30 pm etc).
      Show
      Log in as admin. Go to Admin / Location / Location settings and configure: timezone = "Australia/Sydney" forcetimezone = "Users can choose their own timezone" Save changes (button) Go to current user (admin) profile, click "Edit profile" and configure: Timezone = "Server timezone (Australia/Sydney)" Update profile (button) Create a course. Create 8 assignments with due date as folollowing: Assignment due on 01 Sep 2020 at 09 : 00 AM Assignment due on 01 Sep 2020 at 10 : 00 AM Assignment due on 01 Sep 2020 at 11 : 30 PM Assignment due on 02 Sep 2020 at 00 : 30 AM Assignment due on 01 Nov 2020 at 11 : 30 PM Assignment due on 02 Nov 2020 at 00 : 30 AM Assignment due on 01 May 2021 at 11 : 30 PM Assignment due on 02 May 2021 at 00 : 30 AM Set system date to `04 Apr 2020 Australia/Sydney timezone` (a day before DST ends). Timezone can be different, but should observe daylight saving time. In further steps Australia/Sydney timezone and its start/end dates will be used. Enroll your user to the course. Navigate to dashboard. Add Timeline block. Confirm , that all 8 events are aligned to the correct dates. Set system date to `05 Apr 2020 Australia/Sydney timezone` (the day when DST ends). Refresh the dashboard page. Confirm , that all 8 events are aligned to the correct dates. Set system date to `06 Apr 2020 Australia/Sydney timezone` (a day after DST ends). Refresh the dashboard page. Confirm , that 8 events are aligned to the correct dates. Set system date to `03 Oct 2020 Australia/Sydney timezone` (a day before DST starts). Refresh the dashboard page. Confirm , that all 8 events are aligned to the correct dates. Set system date to `04 Oct 2020 Australia/Sydney timezone` (the day when DST starts). Refresh the dashboard page. Confirm , that all 8 events are aligned to the correct dates. Set system date to `05 Oct 2020 Australia/Sydney timezone` (a day after DST starts). Refresh the dashboard page. Confirm , that all 8 events are aligned to the correct dates. Set system date to current date. Navigate to Dashboard > Preferences > User account > Edit profile and set your user timezone to "Asia/Magadan" (can be defferent depending on your timezone, but is supposed to be "+1" hour). Open the dashboard page. Confirm , that all 8 events were adjusted with regards to new user timezone (eg "Assignment due on 01 Sep 2020 at 09:00 AM" moved to 1 Sep 10 am, "Assignment due on 01 Sep 2020 at 11:30 PM" moved to 2 Sep 00:30 am etc). Navigate to Dashboard > Preferences > User account > Edit profile and set your user timezone to "Asia/Seoul" (can be defferent depending on your timezone, but is supposed to be "-1" hour). Open the dashboard page. Confirm , that all 8 events were adjusted with regards to new user timezone (eg "Assignment due on 01 Sep 2020 at 10:00 AM" moved to 1 Sep 9 am,  "Assignment due on 02 Sep 2020 at 00:30 AM" moved to 1 Sep 11:30 pm etc).

    Description

      Original description:

      1. Create new course with completion tracking enabled
      2. Add label with Activity Completion Expected Completion date of 22nd Dec 2019
      3. Go to the dashboard
      4. Change Timeline block to show 6 months ahead
      5. See that date due for the label created at 2. is 21st Dec 2019 (one day before what it should be)
      6. This does not occur for dates within the next 5 weeks (so today, 18th Sept 2019, dates of 27th Oct 2019 and forwards show correctly in the Timeline block)
      7. This has been tested with quiz and assignment with the same result

       Update:

      So the issue can be caught, when user in timezone which observes DST being in summer has winter events in their Timeline block. 

      MDL-63044 was designed to rely on user timezone set in Moodle, not the timezone that can be retrieved from user browser.

      However, having today user midnight timestamp is not enough to figure out user timezone and does it observe DST or not (eg Melbourne, Australia vs Vladivostok, Russia).

      Attachments

        1. actvompl.png
          actvompl.png
          13 kB
        2. doubled-up-dates.png
          doubled-up-dates.png
          16 kB
        3. Force timezone to UTC.png
          Force timezone to UTC.png
          33 kB
        4. image-2020-01-13-10-49-56-612.png
          image-2020-01-13-10-49-56-612.png
          117 kB
        5. image-2020-07-17-15-15-21-325.png
          image-2020-07-17-15-15-21-325.png
          827 kB
        6. image-2020-07-20-14-14-45-525.png
          image-2020-07-20-14-14-45-525.png
          33 kB
        7. MDL-66716.jpg
          MDL-66716.jpg
          72 kB
        8. MDL-66716 (2).jpg
          MDL-66716 (2).jpg
          29 kB
        9. screenshots.jpg
          screenshots.jpg
          197 kB
        10. timeline.png
          timeline.png
          8 kB
        11. timeline-incorrect-dates.png
          timeline-incorrect-dates.png
          119 kB
        12. user profile timezone settings.png
          user profile timezone settings.png
          3 kB

        Issue Links

          Activity

            People

              mikhailgolenkov Misha Golenkov
              chris.pratt Chris Pratt
              Neill Magill Neill Magill
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Anna Carissa Sadia Anna Carissa Sadia
              Votes:
              7 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Nov/20

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h