Skip to content

Commit 0ed3067

Browse files
committed
Replace Timezones not in Unicode CLDR
- Israel is deprecated in favor of Asia/Jerusalem - Brazil/East is deprecated in favor of America/Sao_Paulo - Asia/Chongqing is an alias for Asia/Shanghai
1 parent 2aea802 commit 0ed3067

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

TestFoundation/TestNSCalendar.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,8 @@ class TestNSCalendar: XCTestCase {
371371
try yield(to: block, (.gregorian, "en_US", "America/Edmonton", "1906-09-01 00:33:52 -0700"))
372372
try yield(to: block, (.gregorian, "en_US", "America/Los_Angeles", "2014-09-23 20:11:39 -0800"))
373373
try yield(to: block, (.gregorian, "en_US", "America/Los_Angeles", "2016-02-29 06:30:33 -0900"))
374-
try yield(to: block, (.hebrew, "he_IL", "Israel", "2018-12-24 05:40:43 +0200"))
375-
try yield(to: block, (.hebrew, "he_IL", "Israel", "2019-03-22 09:23:26 +0200"))
374+
try yield(to: block, (.hebrew, "he_IL", "Asia/Jerusalem", "2018-12-24 05:40:43 +0200"))
375+
try yield(to: block, (.hebrew, "he_IL", "Asia/Jerusalem", "2019-03-22 09:23:26 +0200"))
376376
try yield(to: block, (.buddhist, "es_MX", "America/Cancun", "2022-10-26 23:05:34 -0500"))
377377
try yield(to: block, (.buddhist, "es_MX", "America/Cancun", "2014-10-22 07:13:00 -0500"))
378378
try yield(to: block, (.japanese, "ja_JP", "Asia/Tokyo", "2013-08-23 06:09:01 +0900"))
@@ -496,8 +496,8 @@ class TestNSCalendar: XCTestCase {
496496
}
497497

498498
try yield(to: block, (.gregorian, "en_US", "America/Los_Angeles", "2013-03-26 10:04:16 -0700", "2013-03-26 00:00:00 -0700"))
499-
try yield(to: block, (.gregorian, "pt_BR", "Brazil/East", "2013-10-20 13:10:20 -0200", "2013-10-20 01:00:00 -0200")) // DST jump forward at midnight
500-
try yield(to: block, (.gregorian, "pt_BR", "Brazil/East", "2014-02-15 23:59:59 -0300", "2014-02-15 00:00:00 -0200")) // DST jump backward
499+
try yield(to: block, (.gregorian, "pt_BR", "America/Sao_Paulo", "2013-10-20 13:10:20 -0200", "2013-10-20 01:00:00 -0200")) // DST jump forward at midnight
500+
try yield(to: block, (.gregorian, "pt_BR", "America/Sao_Paulo", "2014-02-15 23:59:59 -0300", "2014-02-15 00:00:00 -0200")) // DST jump backward
501501
}
502502

503503
func test_startOfDayForDate() throws {
@@ -729,7 +729,7 @@ class TestNSCalendar: XCTestCase {
729729
try yield(to: block, (.gregorian, "en_US", "Africa/Algiers", "1971-04-24 00:00:00 +0000", "1971-04-26 00:00:00 +0100")) // suprise weekday 1
730730
try yield(to: block, (.gregorian, "en_US", "America/Toronto", "1919-03-29 00:00:00 -0500", "1919-03-31 00:30:00 -0400")) // suprise weekday 2
731731
try yield(to: block, (.gregorian, "en_US", "Europe/Madrid", "1978-04-01 00:00:00 +0100", "1978-04-03 00:00:00 +0200")) // suprise weekday 3
732-
try yield(to: block, (.hebrew, "he_IL", "Israel", "2018-03-23 00:00:00 +0200", "2018-03-25 00:00:00 +0300")) // weekend with DST jump
732+
try yield(to: block, (.hebrew, "he_IL", "Asia/Jerusalem", "2018-03-23 00:00:00 +0200", "2018-03-25 00:00:00 +0300")) // weekend with DST jump
733733
try yield(to: block, (.japanese, "ja_JP", "Asia/Tokyo", "2015-08-22 00:00:00 +0900", "2015-08-24 00:00:00 +0900")) // japanese
734734
try yield(to: block, (.persian, "ps_AF", "Asia/Kabul", "2015-03-19 00:00:00 +0430", "2015-03-21 00:00:00 +0430")) // persian
735735
try yield(to: block, (.coptic, "ar_EG", "Africa/Cairo", "2015-12-18 00:00:00 +0200", "2015-12-20 00:00:00 +0200")) // coptic
@@ -771,7 +771,7 @@ class TestNSCalendar: XCTestCase {
771771
func test_enumerateDatesStartingAfterDate_chineseEra_matchYearOne() throws {
772772
let calendar = try XCTUnwrap(NSCalendar(calendarIdentifier: .chinese))
773773
let locale = Locale(identifier: "zh_CN")
774-
let timeZone = try XCTUnwrap(TimeZone(identifier: "Asia/Chongqing"))
774+
let timeZone = try XCTUnwrap(TimeZone(identifier: "Asia/Shanghai"))
775775
calendar.locale = locale
776776
calendar.timeZone = timeZone
777777

0 commit comments

Comments
 (0)