Apple’s latest Watch is crashing and rebooting due to Daylight Saving Time bug
theverge.com
theverge.com
extension Date {
static func fromString(_ string: String) -> Date {
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-M-d"
return formatter.date(from: string)! ///Force unwrap because I never pass invalid strings.
}
}Even though I was passing a valid string it still crashed because it couldn't parse it into a date. I solved the problem by adding a random hour to the date(All that mattered to me is the day/month/year so I just don't use the hour/minutes/seconds).
I wonder if it's the same bug causing a boot loop since it's being used by iOS itself.