Closed
Description
Previous ID | SR-8078 |
Radar | None |
Original Reporter | guidomb (JIRA User) |
Type | Bug |
Status | Closed |
Resolution | Done |
Environment
Ubuntu 16.04 Swift 4.2 Snapshot 2018-06-21
Additional Detail from JIRA
Votes | 0 |
Component/s | Foundation |
Labels | Bug |
Assignee | @spevans |
Priority | Medium |
md5: 97cf690688a2a5cb9c0ffeec6acfa0c9
Issue Description:
The following time zone identifiers which are returned by
TimeZone.knownTimeZoneIdentifiers
when used with
TimeZone.init?(idintifier:)
returns nil:
"America/Fort_Nelson",
"America/Punta_Arenas",
"Asia/Famagusta",
"Asia/Atyrau",
"Asia/Yangon",
"Europe/Kirov",
"Europe/Astrakhan",
"Europe/Saratov",
"Europe/Ulyanovsk",
"Asia/Barnaul",
"Asia/Tomsk"
To easily test this you can use the following code snippet
TimeZone.knownTimeZoneIdentifiers
.map { ($0, TimeZone(identifier: $0)) }
.filter { $0.1 == nil }
.forEach { print("Ofender: \($0)") }
If you run on macOS nothing gets printed but if you run it on Ubuntu 16.04 you get the previous list of identifiers.
You can use https://hub.docker.com/r/guidomb/swift-snapshots/tags/ which I publish and use in my code.