Skip to content

Commit 3d4ff9a

Browse files
committed
Add Pacific/Kanton timezone
1 parent 1a6c450 commit 3d4ff9a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/Timezone.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ public function getCountryCode(): string
5353
$this->timezone = 'Europe/Kiev';
5454
}
5555

56+
if ($this->timezone === 'Pacific/Kanton') {
57+
$this->timezone = 'Pacific/Enderbury';
58+
}
59+
5660
try {
5761
$dateTimeZone = new DateTimeZone($this->timezone);
5862
$location = $dateTimeZone->getLocation();

tests/Unit/TimezoneTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ public function dataProvider(): array
113113
[++$number, 'getCountryName', null, 'Pacific/Marquesas', CountryAustralia::COUNTRY_NAME_PF[Locale::EN_GB]],
114114
[++$number, 'getCountryCode', null, 'Pacific/Port_Moresby', CountryAustralia::COUNTRY_CODE_PG],
115115
[++$number, 'getCountryName', null, 'Pacific/Port_Moresby', CountryAustralia::COUNTRY_NAME_PG[Locale::EN_GB]],
116+
[++$number, 'getCountryCode', null, 'Pacific/Kanton', CountryAustralia::COUNTRY_CODE_KI],
117+
[++$number, 'getCountryName', null, 'Pacific/Kanton', CountryAustralia::COUNTRY_NAME_KI[Locale::EN_GB]],
116118

117119
/**
118120
* getCountry/getCountryName: Europe

0 commit comments

Comments
 (0)