Moodle
  1. Moodle
  2. MDL-38668

Update timezones info to latest version available (2013b)

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.6, 2.4.3, 2.5
    • Fix Version/s: 2.3.7, 2.4.4
    • 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: "2296 entries imported from YOUR_MOODLE_BASEDIR/lib/timezone.txt". 2296 is the important bit. And also that the load has happened from that directory.
      • TEST: Run the simple/phpunit tests, paying attention to any testmoodlelib.php result. 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 testmoodlelib.php and 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 (2296) 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: "2296 entries imported from YOUR_MOODLE_BASEDIR/lib/timezone.txt". 2296 is the important bit. And also that the load has happened from that directory. TEST: Run the simple/phpunit tests, paying attention to any testmoodlelib.php result. 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 testmoodlelib.php and 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 (2296) but loaded from http://download.moodle.org/timezone/
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull 2.4 Branch:
    • Pull Master Branch:
    • Rank:
      48717

      Description

      Last update was done 4 months ago (to tzdata2012j database, see MDL-37176). Going to update to tzdata2013b.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 (23, 24 and master).

      Ciao

        Issue Links

          Activity

          Hide
          Eloy Lafuente (stronk7) added a comment -

          Sending to integration...

          Show
          Eloy Lafuente (stronk7) added a comment - Sending to integration...
          Hide
          Damyon Wiese added a comment -

          Thanks Eloy, integrated to 23, 24 and master.

          Show
          Damyon Wiese added a comment - Thanks Eloy, integrated to 23, 24 and master.
          Hide
          David Monllaó added a comment -

          It passes, tested in master, 24 and 23.

          With the network disabled I see:

          cURL request for "http://download.moodle.org/timezone/" failed with: Couldn't resolve host 'download.moodle.org' (6)
          
          Show
          David Monllaó added a comment - It passes, tested in master, 24 and 23. With the network disabled I see: cURL request for "http: //download.moodle.org/timezone/" failed with: Couldn't resolve host 'download.moodle.org' (6)
          Hide
          Damyon Wiese added a comment -

          Thanks for your hard work. This issue has been integrated upstream and is now available via git (and in some hours, via mirrors and downloads).

          Show
          Damyon Wiese added a comment - Thanks for your hard work. This issue has been integrated upstream and is now available via git (and in some hours, via mirrors and downloads).

            People

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

              Dates

              • Created:
                Updated:
                Resolved: