Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-14610 Chat: 1.9 fixing and cleanup
  3. MDL-7629

chat time disregards site wide timezone settings

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • 1.9.2
    • 1.6.3
    • Chat
    • None
    • Red Hat Enterprise Linux AS4 / Apache 2.2.3 / PHP 4.4.2 / MySQL 4.1.20
    • MySQL
    • MOODLE_16_STABLE
    • MOODLE_19_STABLE

      Our site is configured to force a particular timezone on users ( Admin > Calendar -> timezones ). With DST that is currently GMT-6 (we're in Minnesota). The user accounts were initially created in September so they have timezones of GMT-5. This works fine most places, but not in chat. The current code disregards the setting in Admin>Calendar->timezones and uses the one set in the useraccount instead. To Fix this, I've applied the following patch to moodle/mod/chat/lib.php:

      diff lib.php lib.php-orig
      529,534d528
      < if(isset($CFG->forcetimezone)){
      < if($CFG->forcetimezone != 99)

      { < $currentuser->timezone = $CFG->forcetimezone ; < }

      < }
      <

      This checks to see if the forcetimezone value has been set and uses it instead of the currentuser value. I've tested this with and without the Admin->Calendar->timezones setting and it seems to work properly when both the timezone is specified and when users are allowed to choose.

      Matt

            dongsheng Dongsheng Cai
            mbockol Matt Bockol (Inactive)
            Nicolas Connault Nicolas Connault (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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