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

Calendar new event modal shows wrong date (based on timezone)

XMLWordPrintable

      Bitnami/moodle 4.3.1

      Reproducing error:
      1. Default server timezone - Europe/London.
      2. User timezone - Europe/Kyiv.
      3. Click on the calendar cell January 3.
      4. In the popup January 2.

      Quick fix:
      In the file 

      moodle/calendar/classes/external/day_exporter.php

       on line 169 change 

      new \DateTimeImmutable();

       to

      new \DateTimeImmutable(timezone: new \DateTimeZone(\core_date::get_user_timezone()));

            pholden Paul Holden
            арчилабуладзе Archil Abuladze
            Stevani Andolo Stevani Andolo
            Huong Nguyen Huong Nguyen
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 36 minutes
                1h 36m

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