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

Timezone option not considered in dateselector and datetimeselector form element

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.12, 2.0
    • Fix Version/s: 2.3
    • Component/s: Forms Library
    • Labels:
    • Testing Instructions:
      Hide

      run php unit test for dateselector and datetimeselector

      phpunit dateselector_form_element_testcase lib/form/tests/dateselector_test.php
      phpunit datetimeselector_form_element_testcase lib/form/tests/datetimeselector_test.php

      Show
      run php unit test for dateselector and datetimeselector phpunit dateselector_form_element_testcase lib/form/tests/dateselector_test.php phpunit datetimeselector_form_element_testcase lib/form/tests/datetimeselector_test.php
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
      wip-mdl-27562

      Description

      /lib/form/dateselector.php doesn't pass configurable option 'timezone' to function usergetdate() as 2nd parameter.

      In function: onQuickFormEvent($event, $arg, &$caller)
      Change:
       
          if (!is_array($value)) {
              $currentdate = usergetdate($value);
              $value = array(
       
      To:
       
          if (!is_array($value)) {
              $currentdate = usergetdate($value, $this->_options['timezone']);
              $value = array(

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    25/Jun/12