mirror of
https://github.com/samsonjs/SwiftTimeZoneLookup.git
synced 2026-03-25 08:25:49 +00:00
fix Curacao lookup
This commit is contained in:
parent
277983b6e0
commit
9fc508efb2
2 changed files with 6 additions and 1 deletions
|
|
@ -115,6 +115,10 @@ public final class SwiftTimeZoneLookup {
|
|||
// Reasons unknown, could be an invalid polygon
|
||||
return "Europe/Athens"
|
||||
}
|
||||
if (11.865393...12.474443).contains(latitude) && (-69.312710...(-68.613387)).contains(longitude) {
|
||||
// Curacao island
|
||||
return "America/Curacao"
|
||||
}
|
||||
|
||||
guard let result = highResLookup(latitude: latitude, longitude: longitude) else {
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ final class SwiftTimeZoneLookupTests: XCTestCase {
|
|||
XCTAssertEqual(database.simple(latitude: 36.8370, longitude: 25.8904), "Europe/Athens") // island to the north
|
||||
XCTAssertEqual(database.simple(latitude: 36.3683, longitude: 25.7735), "Europe/Athens") // island to north west
|
||||
|
||||
|
||||
// https://github.com/open-meteo/open-meteo/issues/589
|
||||
XCTAssertEqual(database.simple(latitude: 12.2, longitude: -68.97), "America/Curacao")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue