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

Update timezones info to latest version available (2013h)

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.6, 2.5.2, 2.6
    • Fix Version/s: 2.4.7, 2.5.3
    • 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: "2287 entries imported from YOUR_MOODLE_BASEDIR/lib/timezone.txt". 2287 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 (24h later at least), with network access enabled, load the timezones again, it should show the same number of timezones (2287) 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: "2287 entries imported from YOUR_MOODLE_BASEDIR/lib/timezone.txt". 2287 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 (24h later at least), with network access enabled, load the timezones again, it should show the same number of timezones (2287) but loaded from http://download.moodle.org/timezone/
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Last update was done 7 months ago (to tzdata2013b database, see MDL-38668). Going to update to tzdata2013h.tar.gz

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

      Instructions:

      The olson.txt to be imported is the concatenation, in one unique file, of these 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 (24, 25 and master).

      Ciao

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            New files ready, sending straight to integration (does not contain code).

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - New files ready, sending straight to integration (does not contain code). Ciao
            Hide
            poltawski Dan Poltawski added a comment -

            Integrated to master, 25 and 24 - thanks Eloy

            Show
            poltawski Dan Poltawski added a comment - Integrated to master, 25 and 24 - thanks Eloy
            Hide
            skodak Petr Skoda added a comment -

            stealing for testing...

            Show
            skodak Petr Skoda added a comment - stealing for testing...
            Hide
            skodak Petr Skoda added a comment -

            I am getting: 2296 entries imported from http://download.moodle.org/timezone/
            is that ok?

            Show
            skodak Petr Skoda added a comment - I am getting: 2296 entries imported from http://download.moodle.org/timezone/ is that ok?
            Hide
            skodak Petr Skoda added a comment -

            ah, the last point in the testing instructions explains it - we have to wait till moodle.org gets updated, passing...

            Show
            skodak Petr Skoda added a comment - ah, the last point in the testing instructions explains it - we have to wait till moodle.org gets updated, passing...
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            thanks, Petr!

            Yes, the last point is only available some hours after the change has been spread to moodle.git

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - thanks, Petr! Yes, the last point is only available some hours after the change has been spread to moodle.git Ciao
            Hide
            damyon Damyon Wiese added a comment -

            Here lies 52 bugs.
            All fixed or swept under a rug.
            If they come back one day,
            To our dismay,
            We all will feel quite un-smug.

            Thanks for the reporting/fixing/testing on this issue. It has been sent upstream.

            Show
            damyon Damyon Wiese added a comment - Here lies 52 bugs. All fixed or swept under a rug. If they come back one day, To our dismay, We all will feel quite un-smug. Thanks for the reporting/fixing/testing on this issue. It has been sent upstream.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Nov/13