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

Calendar problematic time calculations

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.4
    • Fix Version/s: 3.4
    • Component/s: Calendar
    • Labels:
    • Testing Instructions:
      Hide
      1. Log in as admin and go to calendar
      2. Add few events: one day ago, today, tomorrow and few days ahead.
      3. Add another event in the very first day of the next month.
      4. On the calendar month view make sure all events displayed belongs to the month you are viewing and the event you created on the first day of the next month is not displayed.
      5. Click on the number representing the day (today) to go to day view
      6. Make sure all events displayed belongs to that day, and tomorrow events are not displayed.
      7. Using the day navigation link (Thursday ►), switch to next day.
      8. Make sure the events displayed belongs to the day you are viewing.
      9. Go back to days ago using the day navigation link (◄ Tuesday)
      10. Make sure the events displayed belongs to the day you are viewing.
      11. On the user menu, click on Preferences.
      12. Click Calendar preferences
      13. On your calendar preferences, set Upcoming events look-ahead to 1 and save.
      14. Now, go back to site home.
      15. Turn editing on and add upcoming block
      16. Make sure it display only today's events.
      17. Go back to calendar preferences and change that setting to 2.
      18. Go back to site home and make sure the upcoming events just display events from today, tomorrow.
      Show
      Log in as admin and go to calendar Add few events: one day ago, today, tomorrow and few days ahead. Add another event in the very first day of the next month. On the calendar month view make sure all events displayed belongs to the month you are viewing and the event you created on the first day of the next month is not displayed. Click on the number representing the day (today) to go to day view Make sure all events displayed belongs to that day, and tomorrow events are not displayed. Using the day navigation link (Thursday ►), switch to next day. Make sure the events displayed belongs to the day you are viewing. Go back to days ago using the day navigation link (◄ Tuesday) Make sure the events displayed belongs to the day you are viewing. On the user menu, click on Preferences . Click Calendar preferences On your calendar preferences, set Upcoming events look-ahead to 1 and save. Now, go back to site home. Turn editing on and add upcoming block Make sure it display only today's events. Go back to calendar preferences and change that setting to 2. Go back to site home and make sure the upcoming events just display events from today, tomorrow.
    • Affected Branches:
      MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-60406-master

      Description

      We just noticed the calendar_get_view() is calculating dates using DAYSECS and HOURSECS for day, month and upcoming views. That can be a problem, specially for daylight savings, returning the wrong time.

      We need to review calendar_get_view() and maybe other places using those constants and change them to use our Time API.

      https://docs.moodle.org/dev/Time_API

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lameze Simey Lameze
                Reporter:
                lameze Simey Lameze
                Peer reviewer:
                Mihail Geshoski
                Integrator:
                David Monllaó
                Tester:
                Adrian Greeve
                Participants:
                Component watchers:
                Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Nov/17