Skip to content

Commit

Permalink
MDL-51893 core_date: Stop using Pacific/Norfolk as 11.5 replacement
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stronk7 committed Oct 27, 2015
1 parent 9382ac3 commit 7c549a1
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion lib/classes/date.php
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,6 @@ protected static function init_zones() {
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) {
Expand Down
2 changes: 0 additions & 2 deletions lib/tests/date_legacy_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ public function test_get_timezone_offset() {
$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();
}
Expand Down
1 change: 0 additions & 1 deletion lib/tests/date_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ public function test_normalise_timezone() {
$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'));
Expand Down

0 comments on commit 7c549a1

Please sign in to comment.