MDL-54008 timezone: Updating references to Caracas tz.

I've removed Caracas direct references because it would fail on
some systems, it would depend on how updated is the olson version
PHP is using.
This commit is contained in:
David Monllao 2016-05-02 12:37:32 +08:00
parent 3219a4535f
commit dd215cb1a3
4 changed files with 7 additions and 8 deletions

View File

@ -532,7 +532,6 @@ class core_date {
}
// Legacy Moodle half an hour offsets - pick any city nearby, ideally without DST.
self::$badzones['-4.5'] = 'America/Caracas';
self::$badzones['4.5'] = 'Asia/Kabul';
self::$badzones['5.5'] = 'Asia/Kolkata';
self::$badzones['6.5'] = 'Asia/Rangoon';

View File

@ -67,6 +67,7 @@ class core_date_testcase extends advanced_testcase {
$this->assertSame('Etc/GMT-2', core_date::normalise_timezone('2.0'));
$this->assertSame('Etc/GMT+2', core_date::normalise_timezone(-2));
$this->assertSame('Etc/GMT+2', core_date::normalise_timezone('-2.0'));
$this->assertSame('Etc/GMT+4', core_date::normalise_timezone(-4));
$this->assertSame('Etc/GMT-2', core_date::normalise_timezone('UTC+2'));
$this->assertSame('Etc/GMT+2', core_date::normalise_timezone('UTC-2'));
$this->assertSame('Etc/GMT-2', core_date::normalise_timezone('GMT+2'));
@ -78,7 +79,6 @@ class core_date_testcase extends advanced_testcase {
$this->assertSame('Etc/GMT-13', core_date::normalise_timezone(13));
$this->assertSame('Pacific/Auckland', core_date::normalise_timezone(14));
$this->assertSame('America/Caracas', core_date::normalise_timezone(-4.5));
$this->assertSame('Asia/Kabul', core_date::normalise_timezone(4.5));
$this->assertSame('Asia/Kolkata', core_date::normalise_timezone(5.5));
$this->assertSame('Asia/Rangoon', core_date::normalise_timezone(6.5));

View File

@ -116,7 +116,7 @@ For terms of use, see http://www.unicode.org/copyright.html
<mapZone other="US Eastern Standard Time" territory="001" type="America/Indianapolis"/>
<mapZone other="US Eastern Standard Time" territory="US" type="America/Indianapolis America/Indiana/Marengo America/Indiana/Vevay"/>
<!-- (UTC-04:30) Caracas -->
<!-- (UTC-04:00) Caracas -->
<mapZone other="Venezuela Standard Time" territory="001" type="America/Caracas"/>
<mapZone other="Venezuela Standard Time" territory="VE" type="America/Caracas"/>
@ -672,4 +672,4 @@ For terms of use, see http://www.unicode.org/copyright.html
<mapZone other="Line Islands Standard Time" territory="ZZ" type="Etc/GMT-14"/>
</mapTimezones>
</windowsZones>
</supplementalData>
</supplementalData>

View File

@ -127,7 +127,7 @@ class core_scheduled_task_testcase extends advanced_testcase {
// The timezones used in this test are chosen because they do not use DST - that would break the test.
$this->resetAfterTest();
$this->setTimezone('America/Caracas');
$this->setTimezone('Asia/Kabul');
$testclass = new \core\task\scheduled_test_task();
@ -143,9 +143,9 @@ class core_scheduled_task_testcase extends advanced_testcase {
$userdate = userdate($nexttime);
// Should be displayed in user timezone.
// I used http://www.timeanddate.com/worldclock/fixedtime.html?msg=Moodle+Test&iso=20140314T01&p1=58
// to verify this time.
$this->assertContains('11:15 AM', core_text::strtoupper($userdate));
// I used http://www.timeanddate.com/worldclock/fixedtime.html?msg=Moodle+Test&iso=20160502T01&p1=113
// setting my location to Kathmandu to verify this time.
$this->assertContains('2:15 AM', core_text::strtoupper($userdate));
}
public function test_reset_scheduled_tasks_for_component() {