From 1e0cc8037e769ba4fb59f1ad24b47908f26b4813 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Fri, 2 Oct 2020 10:00:48 -0500 Subject: [PATCH] Tweak isEqual: to make it more robust. --- Clocker/Panel/Data Layer/TimezoneData.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Clocker/Panel/Data Layer/TimezoneData.swift b/Clocker/Panel/Data Layer/TimezoneData.swift index 0487a13..affcb70 100644 --- a/Clocker/Panel/Data Layer/TimezoneData.swift +++ b/Clocker/Panel/Data Layer/TimezoneData.swift @@ -431,7 +431,9 @@ class TimezoneData: NSObject, NSCoding { guard let compared = object as? TimezoneData else { return false } - return placeID == compared.placeID + + // Plain timezones might have similar placeID. Adding another check for timezone identifier. + return placeID == compared.placeID && timezoneID == compared.timezoneID } }