diff --git a/Clocker/Panel/Data Layer/TimezoneData.swift b/Clocker/Panel/Data Layer/TimezoneData.swift index 89a6767..73afe5c 100644 --- a/Clocker/Panel/Data Layer/TimezoneData.swift +++ b/Clocker/Panel/Data Layer/TimezoneData.swift @@ -248,6 +248,7 @@ class TimezoneData: NSObject, NSCoding { let newTimezone = TimezoneData(with: oldModel) newModels.append(newTimezone) } else if let newModel = old as? TimezoneData { + shouldOverrideSecondsFormatBugFix(model: newModel) newModels.append(newModel) } } @@ -260,6 +261,14 @@ class TimezoneData: NSObject, NSCoding { 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) { aCoder.encode(placeID, forKey: "place_id")