Browse Source

Seconds fix!

pull/92/head
Abhishek 6 years ago
parent
commit
1068e7f7fb
  1. 9
      Clocker/Panel/Data Layer/TimezoneData.swift

9
Clocker/Panel/Data Layer/TimezoneData.swift

@ -248,6 +248,7 @@ class TimezoneData: NSObject, NSCoding {
let newTimezone = TimezoneData(with: oldModel) let newTimezone = TimezoneData(with: oldModel)
newModels.append(newTimezone) newModels.append(newTimezone)
} else if let newModel = old as? TimezoneData { } else if let newModel = old as? TimezoneData {
shouldOverrideSecondsFormatBugFix(model: newModel)
newModels.append(newModel) newModels.append(newModel)
} }
} }
@ -260,6 +261,14 @@ class TimezoneData: NSObject, NSCoding {
return serializedModels return serializedModels
} }
private class func shouldOverrideSecondsFormatBugFix(model: TimezoneData) {
if UserDefaults.standard.object(forKey: "shouldOverrideSecondsFormatBugFix") == nil {
model.setShouldOverrideSecondsFormat(2)
UserDefaults.standard.set("YES", forKey: "shouldOverrideSecondsFormatBugFix")
return
}
}
func encode(with aCoder: NSCoder) { func encode(with aCoder: NSCoder) {
aCoder.encode(placeID, forKey: "place_id") aCoder.encode(placeID, forKey: "place_id")

Loading…
Cancel
Save