Moodle
  1. Moodle
  2. MDL-27966

Update timezones info to latest version available (2T2011)

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.12, 2.0.3
    • Fix Version/s: 1.9.13, 2.0.4
    • Component/s: Libraries
    • Labels:
      None
    • 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: "2184 entries imported from YOUR_MOODLE_BASEDIR/lib/timezone.txt". 2184 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 "328 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 (2184) 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: "2184 entries imported from YOUR_MOODLE_BASEDIR/lib/timezone.txt". 2184 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 "328 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 (2184) but loaded from http://download.moodle.org/timezone/
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-27966_master
    • Rank:
      17647

      Description

      Last update was done 12 months ago (to tzdata2010i database). Going to update to tzdata2011g.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 and master).

      Ciao

        Issue Links

          Activity

          Hide
          Eloy Lafuente (stronk7) added a comment -

          Submitting for integration. It just updates the timezone files included on each moodle version + one minor fix to avoid one notice.

          This updates the timezones from 2147 to 2184 (2011g).

          Show
          Eloy Lafuente (stronk7) added a comment - Submitting for integration. It just updates the timezone files included on each moodle version + one minor fix to avoid one notice. This updates the timezones from 2147 to 2184 (2011g).
          Hide
          Sam Hemelryk added a comment -

          Thanks Eloy, integrated now.
          Nearly had a heart attack when I saw the changes amounted to 4000+ lines - till I realised what it was

          Show
          Sam Hemelryk added a comment - Thanks Eloy, integrated now. Nearly had a heart attack when I saw the changes amounted to 4000+ lines - till I realised what it was
          Hide
          Eloy Lafuente (stronk7) added a comment -

          yeah, they use to be huge because of that "id" changing, lol. Always I do one upgrade I think, we must keep that out for the next upgrade (in fact I'm 99.99% sure it's not used at all), but right now... knowing that the idea is to move to php-own tz support...

          Thanks, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - yeah, they use to be huge because of that "id" changing, lol. Always I do one upgrade I think, we must keep that out for the next upgrade (in fact I'm 99.99% sure it's not used at all), but right now... knowing that the idea is to move to php-own tz support... Thanks, ciao
          Hide
          Sam Hemelryk added a comment -

          All tested and passed thanks Eloy

          Show
          Sam Hemelryk added a comment - All tested and passed thanks Eloy
          Hide
          Eloy Lafuente (stronk7) added a comment -

          All git & cvs servers have been updated with these cool changes, so closing, many thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - All git & cvs servers have been updated with these cool changes, so closing, many thanks!

            People

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

              Dates

              • Created:
                Updated:
                Resolved: