MDL-51893 core_date: Stop using Pacific/Norfolk as 11.5 replacement
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 27 Oct 2015 08:55:04 +0000 (09:55 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 27 Oct 2015 09:17:05 +0000 (10:17 +0100)
Norfolk Island's standard time (NFT) was on UTC+11:30 until 4 October
2015, when it was changed to UTC+11:00. So it's not suitable for 11.5
bad mapping replacement anymore.

It seems that there isn't any other location using such 11.5 timezone
so completely getting rid of it for conversions.

lib/classes/date.php
lib/tests/date_legacy_test.php
lib/tests/date_test.php

index c2d7b66..bdfec8d 100644 (file)
@@ -537,7 +537,6 @@ class core_date {
         self::$badzones['5.5'] = 'Asia/Kolkata';
         self::$badzones['6.5'] = 'Asia/Rangoon';
         self::$badzones['9.5'] = 'Australia/Darwin';
-        self::$badzones['11.5'] = 'Pacific/Norfolk';
 
         // Remove bad zones that are elsewhere.
         foreach (self::$bczones as $zone => $unused) {
index d495bcd..a048d46 100644 (file)
@@ -154,8 +154,6 @@ class core_date_legacy_testcase extends advanced_testcase {
         $this->assertEquals(60 * 60 * 6.5, get_timezone_offset('Asia/Rangoon'));
         $this->assertEquals(60 * 60 * 9.5, get_timezone_offset('9.5'));
         $this->assertEquals(60 * 60 * 9.5, get_timezone_offset('Australia/Darwin'));
-        $this->assertEquals(60 * 60 * 11.5, get_timezone_offset('11.5'));
-        $this->assertEquals(60 * 60 * 11.5, get_timezone_offset('Pacific/Norfolk'));
 
         $this->resetDebugging();
     }
index c84fcf0..dc0560b 100644 (file)
@@ -83,7 +83,6 @@ class core_date_testcase extends advanced_testcase {
         $this->assertSame('Asia/Kolkata', core_date::normalise_timezone(5.5));
         $this->assertSame('Asia/Rangoon', core_date::normalise_timezone(6.5));
         $this->assertSame('Australia/Darwin', core_date::normalise_timezone('9.5'));
-        $this->assertSame('Pacific/Norfolk', core_date::normalise_timezone('11.5'));
 
         $this->setTimezone('99', 'Pacific/Auckland');
         $this->assertSame('Pacific/Auckland', core_date::normalise_timezone('Pacific/Auckland'));