Moodle
  1. Moodle
  2. MDL-28931

Update timezones info to latest version available (2011h)

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.13, 2.0.4, 2.1.1, 2.2
    • Fix Version/s: 1.9.14, 2.0.5, 2.1.2
    • Component/s: Libraries
    • Labels:
    • Testing Instructions:
      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: "2200 entries imported from YOUR_MOODLE_BASEDIR/lib/timezone.txt". 2200 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 "337 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: 48 hours later, with network access enabled, load the timezones again, it should show the same number of timezones (2200) 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: "2200 entries imported from YOUR_MOODLE_BASEDIR/lib/timezone.txt". 2200 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 "337 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: 48 hours later, with network access enabled, load the timezones again, it should show the same number of timezones (2200) but loaded from http://download.moodle.org/timezone/
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-28931_master
    • Rank:
      17635

      Description

      Last update was done 3 months ago (to tzdata2011g database). Going to update to tzdata2011h.tar.gz

      Source: ftp://elsie.nci.nih.gov/pub/

      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 (19_STABLE, 20_STABLE, 21_STABLE and master).

      Ciao

        Issue Links

          Activity

          Hide
          Eloy Lafuente (stronk7) added a comment -

          Although we updated recently (2 months ago) to 2011g (see MDL-27966), I'm updating to 2011h right now because:

          • There are some changes.
          • We need that exact version to perform comparisons between our Moodle timezone support and PHP's one (2011h is the last version provided by PECL).

          So, doing now...

          Show
          Eloy Lafuente (stronk7) added a comment - Although we updated recently (2 months ago) to 2011g (see MDL-27966 ), I'm updating to 2011h right now because: There are some changes. We need that exact version to perform comparisons between our Moodle timezone support and PHP's one (2011h is the last version provided by PECL). So, doing now...
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Done, upgraded from 2184 to 2200 rules with 2011h. Submitting for integration.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Done, upgraded from 2184 to 2200 rules with 2011h. Submitting for integration. Ciao
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Trivial enough (and super-used here) for self integration.

          Please perform the tests in to 20 or 21 stable.

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Trivial enough (and super-used here) for self integration. Please perform the tests in to 20 or 21 stable. Ciao
          Hide
          Michael de Raadt added a comment -

          Tested all steps up to the "Post-test". Do I really have to wait 48 hours? Works fine up to now.

          Show
          Michael de Raadt added a comment - Tested all steps up to the "Post-test". Do I really have to wait 48 hours? Works fine up to now.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          LOL, no. 48 hours is the time required to have the new file (this commit) available @ download.moodle.org, so we can test it is fetched properly from there.

          But if the same file is loading and working ok locally... then we can pass this without problem.

          Doing that now, thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - LOL, no. 48 hours is the time required to have the new file (this commit) available @ download.moodle.org, so we can test it is fetched properly from there. But if the same file is loading and working ok locally... then we can pass this without problem. Doing that now, thanks!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          This has been sent upstream and is now available in all git & cvs servers. Many thanks for the hard work!

          Show
          Eloy Lafuente (stronk7) added a comment - This has been sent upstream and is now available in all git & cvs servers. Many thanks for the hard work!

            People

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

              Dates

              • Created:
                Updated:
                Resolved: