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

Update timezones info to latest version available (2015g)

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.8.8
    • 2.7.11, 2.8.9
    • Libraries
    • MOODLE_28_STABLE
    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • Hide

      Copied from MDL-49073 testing instructions and adapted.

      1. remove this file in your site if present: dataroot/temp/olson.txt
      2. remove this file in your site if present: dataroot/temp/timezone.txt
      3. disable network access, so http://download.moodle.org/timezone/ cannot be accessed
      4. go to Admin -> Location -> Update timezones
      5. press the continue button, so the local lib/timezone.txt will be loaded
      6. 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.
      7. TEST: ignoring the previous warning, the load ends without any PHP notice/warning/error.
      8. TEST: The page shows this info: "2315 entries imported from YOUR_MOODLE_BASEDIR/lib/timezone.txt". 2315 is the important bit. And also that the load has happened from that directory.
      9. TEST: Run the phpunit tests, paying attention to any lib/tests/moodlelib_test.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 lib/tests/moodlelib_test.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 (2315) but loaded from http://download.moodle.org/timezone/
      Show
      Copied from MDL-49073 testing instructions and adapted. 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 accessed 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: "2315 entries imported from YOUR_MOODLE_BASEDIR/lib/timezone.txt". 2315 is the important bit. And also that the load has happened from that directory. TEST: Run the phpunit tests, paying attention to any lib/tests/moodlelib_test.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 lib/tests/moodlelib_test.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 (2315) but loaded from http://download.moodle.org/timezone/

    Description

      Last update was done 8 months ago (to 2015a database, see MDL-49073). Going to update to tzdata2015g.tar.gz

      Instructions:
      Use https://gist.github.com/jethac/ee03aff52176fb7cc9fe to generate a file from the timezones data in iana.org, rename it as olson.txt
      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 2.7 and 2.8 as this is not needed in 2.9 onwards after MDL-49684 changes
      Ciao

      Attachments

        Issue Links

          Activity

            People

              dmonllao David Monllaó
              dmonllao David Monllaó
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Andrew Lyons Andrew Lyons
              John Okely John Okely
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Nov/15