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

After creating/editing/deleting the view shown is based off GMT not the user's timezone

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.4, 2.2.1, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Calendar
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide

      [Adding Event]
      1/ Go to your user profile and set timezone to GMT +12
      2/ Go to calendar and create an event of 'April fools day' on 01/04/12 at 00:00
      3/ Submit

      Expected Result:

      • Directed to the calendar page of 01/04/12
        Actual Result
      • Directed to the calendar page of 01/03/12

      [Removing Event]
      1/ Carry on from that test find the event on 01/04 in the calendar
      2/ Click the delete button on the event
      3/ Confirm the deletion when asked

      Expected Result:

      • Directed to calendar page of month of April
        Actual Result:
      • Directed to calendar page of month of March

      Repeat tests with 'server timezone'

      Show
      [Adding Event] 1/ Go to your user profile and set timezone to GMT +12 2/ Go to calendar and create an event of 'April fools day' on 01/04/12 at 00:00 3/ Submit Expected Result: Directed to the calendar page of 01/04/12 Actual Result Directed to the calendar page of 01/03/12 [Removing Event] 1/ Carry on from that test find the event on 01/04 in the calendar 2/ Click the delete button on the event 3/ Confirm the deletion when asked Expected Result: Directed to calendar page of month of April Actual Result: Directed to calendar page of month of March Repeat tests with 'server timezone'
    • Workaround:
      Hide

      Apply the attach diff to fix event.php and delete.php

      NOTE: this patch also includes the fix for the minicalendar side block not showing any events (year was not feed in as full date) noted in MDL-31339

      Show
      Apply the attach diff to fix event.php and delete.php NOTE: this patch also includes the fix for the minicalendar side block not showing any events (year was not feed in as full date) noted in MDL-31339
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE

      Description

      Ultimately if your timezone differs significantly from GMT (e.g. AEST) and you use the default midnight event time, you'll be shown the previous day's list. In deletion's case you'll see the previous month if you delete an event on the first of the month.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            salvetore Michael de Raadt added a comment -

            Thanks for spotting that and providing a solution.

            Show
            salvetore Michael de Raadt added a comment - Thanks for spotting that and providing a solution.
            Hide
            poltawski Dan Poltawski added a comment -

            Verified and sumibbitn for peer review

            Show
            poltawski Dan Poltawski added a comment - Verified and sumibbitn for peer review
            Hide
            andyjdavis Andrew Davis added a comment -

            Code looks fine. Expand the testing instructions to include both a user with a manually set timezone (+12 in the instructions) and also one with their timezone set to "Server's local time".

            Show
            andyjdavis Andrew Davis added a comment - Code looks fine. Expand the testing instructions to include both a user with a manually set timezone (+12 in the instructions) and also one with their timezone set to "Server's local time".
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Integrated, thanks! (21, 22 & master)

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks! (21, 22 & master)
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Thanks Ben and Dan,
            Patch works Great

            FYI:
            In master and 22 calendar_print_event is depreciated and is used in /calendar/delete.php, which has been reported in MDL-31133. Hence linking the same to this issue.

            Show
            rajeshtaneja Rajesh Taneja added a comment - Thanks Ben and Dan, Patch works Great FYI: In master and 22 calendar_print_event is depreciated and is used in /calendar/delete.php, which has been reported in MDL-31133 . Hence linking the same to this issue.
            Hide
            poltawski Dan Poltawski added a comment -

            thanks Raj - I spotted that an meant to report it myself

            Show
            poltawski Dan Poltawski added a comment - thanks Raj - I spotted that an meant to report it myself
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Well,

            I wish I said it every time
            you do the things you do.
            You always lend a helping hand,
            and I'm filled with gratitude.

            You are strong and generous
            for each and everyone one of us.
            I am eternally grateful,
            I cannot say thanks enough.

            Sorry for the (un)cool bit above, lol. Closing this as fixed. Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Well, I wish I said it every time you do the things you do. You always lend a helping hand, and I'm filled with gratitude. You are strong and generous for each and everyone one of us. I am eternally grateful, I cannot say thanks enough. Sorry for the (un)cool bit above, lol. Closing this as fixed. Ciao

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Mar/12