Having issue in isDaylightSavingTime in swift
when we check timezone.isDaylightSavingTime(for: <#T##Date#>) we get invalid data for 32 timezones.
Code:
let milliseconds: Double = 1115596800000 //09-MAY-2005 GMT 00:00
let seconds: Int64 = Int64(milliseconds / 1000)
let date = Date(timeIntervalSince1970: TimeInterval(seconds))
let timezone = TimeZone(identifier: "Atlantic/Stanley")!
let components = calendar.dateComponents(in: timezone, from: date)
print("Atlantic/Stanley: \(components.timeZone?.isDaylightSavingTime(for: date))")
we get false value for the date "09-MAY-2005" 32 affected timezone.
List of timezones:
Africa/Windhoek (fixed)
America/Bahia_Banderas (fixed)
America/Cancun (fixed)
America/Chihuahua (fixed)
America/Dawson (fixed)
America/Fort_Nelson (fixed)
America/Godthab (fixed)
America/North_Dakota/Beulah (fixed)
America/Nuuk (fixed)
America/Ojinaga (fixed)
America/Punta_Arenas (fixed)
America/Santarem (fixed)
America/Whitehorse (fixed)
Antarctica/Casey (fixed)
Antarctica/Palmer (fixed)
Asia/Amman (fixed)
Asia/Barnaul (fixed)
Asia/Bishkek (fixed)
Asia/Damascus (fixed)
Asia/Novosibirsk (fixed)
Asia/Sakhalin (fixed)
Asia/Tomsk (fixed)
Atlantic/Stanley (fixed)
Europe/Astrakhan (fixed)
Europe/Istanbul (fixed)
Europe/Minsk (fixed)
Europe/Saratov (fixed)
Europe/Simferopol (fixed)
Europe/Ulyanovsk (fixed)
Pacific/Apia (fixed)
Pacific/Bougainville (fixed)
Pacific/Fakaofo (fixed)