Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-1152

MRBS prior to version 1.4.x mishandles timezones in some environments when displaying bookings made before change to daylight saving time when in daylight saving time. These booking times show as an hour early.

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major Major
    • None
    • 2.0
    • Block: Mrbs
    • None
    • PHP5 & MySQL running on Linux servers.
    • MySQL
    • Easy
    • MOODLE_20_STABLE

      Any bookings made prior to change to DST will have to be fixed using SQL. In tests, the following code (taken from version 1.4.1) fixes the problem for future time changes:

      in web/config.inc.php the following needs to be added:

          • snip --*

      // The timezone your meeting rooms run in. It is especially important
      // to set this if you're using PHP 5 on Linux. In this configuration
      // if you don't, meetings in a different DST than you are currently
      // in are offset by the DST offset incorrectly.
      //
      $timezone = "Europe/London";

          • snip --*

      If your server timezone is not that above, you will need to edit that line. q.v. http://uk3.php.net/timezones for those available.

      in web/functions.inc the following needs to be added near the top of the file:

          • snip --*

      /////////////////////////////////////////
      // Set timezone, if one has been provided

      global $timezone;

      if (isset($timezone))
      {
      if (function_exists("date_default_timezone_set"))
      {
      date_default_timezone_set($timezone);
      }
      else
      {
      putenv("TZ=$timezone");
      }
      }

          • snip --*

      I've tested the above by changing server dates on an Ubuntu server and making bookings before and after this year's DST period and everything behaves properly now.

            davosmith Davo Smith
            gizbun David Davies
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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