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

Update timezones info to latest version available (2011n)

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.1.5, 2.2.2
    • 1.9.13, 2.0.4, 2.1.1, 2.2
    • Libraries
    • MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • Easy
    • Hide
      • remove this file in your site if present: dataroot/temp/olson.txt
      • remove this file in your site if present: dataroot/temp/timezone.txt
      • disable network access, so http://download.moodle.org/timezone/ cannot be accesed
      • go to Admin -> Location -> Update timezones
      • press the continue button, so the local lib/timezone.txt will be loaded
      • TEST: With debugging enabled, you should get one message like "cURL request for "http://download.moodle.org/timezone/" failed". Perfect, that means you disabled network access ok.
      • TEST: ignoring the previous warning, the load ends without any PHP notice/warning/error.
      • TEST: The page shows this info: "2253 entries imported from YOUR_MOODLE_BASEDIR/lib/timezone.txt". 2253 is the important bit. And also that the load has happened from that directory.
      • Go to admin -> development -> unit tests
      • TEST: Run the lib/simpletest/testmoodlelib.php tests. Process should end with "xxx passes, 0 fails and 0 exceptions." (or, alternatively, if there are some tests failing, none of them are related to date/time functions).
      • POST-TEST (optional, must work if all the prev tests have worked): after rolling upstream, with network access enabled, load the timezones again, it should show the same number of timezones (2253) but loaded from http://download.moodle.org/timezone/
      Show
      remove this file in your site if present: dataroot/temp/olson.txt remove this file in your site if present: dataroot/temp/timezone.txt disable network access, so http://download.moodle.org/timezone/ cannot be accesed go to Admin -> Location -> Update timezones press the continue button, so the local lib/timezone.txt will be loaded TEST: With debugging enabled, you should get one message like "cURL request for "http://download.moodle.org/timezone/" failed". Perfect, that means you disabled network access ok. TEST: ignoring the previous warning, the load ends without any PHP notice/warning/error. TEST: The page shows this info: "2253 entries imported from YOUR_MOODLE_BASEDIR/lib/timezone.txt". 2253 is the important bit. And also that the load has happened from that directory. Go to admin -> development -> unit tests TEST: Run the lib/simpletest/testmoodlelib.php tests. Process should end with "xxx passes, 0 fails and 0 exceptions." (or, alternatively, if there are some tests failing, none of them are related to date/time functions). POST-TEST (optional, must work if all the prev tests have worked): after rolling upstream, with network access enabled, load the timezones again, it should show the same number of timezones (2253) but loaded from http://download.moodle.org/timezone/

      Last update was done 5-6 months ago (to tzdata2011h database, see MDL-28931). Going to update to tzdata2011n.tar.gz

      Source: http://www.iana.org/time-zones

      Instructions:

      The olson.txt to be imported is the concatenation, in one unique file of this olson files (in this exact order):

      africa, antarctica, asia, australasia, europe, northamerica and southamerica

      1) Put the olson.txt file into dataroot/temp/olson.txt
      2) Go to Admin -> Location -> Update timezones and confirm
      3) Data will be loaded, replacing existing one
      4) Generate CSV file from phpMyAdmin (commas as field separators, non-quoted values, unix line feeds and first line as field names)
      5) Put it into /lib/timezone.txt
      6) Commit

      Note1: Current timezone.txt format is compatible only with Moodle 1.8 and upwards.
      Note2: We'll be spreading this change to all currently supported versions (21_STABLE, 22_STABLE and master).

      Ciao

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Sam Hemelryk Sam Hemelryk
            Ankit Agarwal Ankit Agarwal
            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.