diff --git a/Clocker/Panel/Notes Popover/NotesPopover.swift b/Clocker/Panel/Notes Popover/NotesPopover.swift index 4ba1af1..1fad105 100644 --- a/Clocker/Panel/Notes Popover/NotesPopover.swift +++ b/Clocker/Panel/Notes Popover/NotesPopover.swift @@ -150,7 +150,7 @@ class NotesPopover: NSViewController { } private func getCurrentTimezoneDate(completionHandler: @escaping (_ response: Date?) -> Void) { - guard let timezoneID = dataObject?.timezoneID else { + guard let timezoneID = dataObject?.timezone() else { assertionFailure("Unable to retrieve timezoneID from the model") completionHandler(nil) return @@ -353,7 +353,7 @@ class NotesPopover: NSViewController { let alertIndex = alertPopupButton.indexOfSelectedItem if eventCenter.createReminder(with: model.customLabel!, - timezone: model.timezoneID!, + timezone: model.timezone(), alertIndex: alertIndex, reminderDate: reminderPicker.dateValue, additionalNotes: model.note) { diff --git a/Clocker/Preferences/General/PreferencesDataSource.swift b/Clocker/Preferences/General/PreferencesDataSource.swift index 97823cd..4b9978a 100644 --- a/Clocker/Preferences/General/PreferencesDataSource.swift +++ b/Clocker/Preferences/General/PreferencesDataSource.swift @@ -130,7 +130,7 @@ extension PreferencesDataSource: NSTableViewDataSource { return model.formattedAddress } - return model.timezoneID + return model.timezone() } func tableView(_: NSTableView, setObjectValue object: Any?, for _: NSTableColumn?, row: Int) { diff --git a/Clocker/Preferences/General/PreferencesViewController.swift b/Clocker/Preferences/General/PreferencesViewController.swift index 3cfff31..7dc6fea 100644 --- a/Clocker/Preferences/General/PreferencesViewController.swift +++ b/Clocker/Preferences/General/PreferencesViewController.swift @@ -633,7 +633,7 @@ extension PreferencesViewController { // Mark if the timezone is same as local timezone let timezoneObject = TimezoneData(with: newTimeZone) - timezoneObject.isSystemTimezone = timezoneObject.timezoneID == NSTimeZone.system.identifier + timezoneObject.isSystemTimezone = timezoneObject.timezone() == NSTimeZone.system.identifier let operationsObject = TimezoneDataOperations(with: timezoneObject) operationsObject.saveObject() @@ -950,8 +950,8 @@ extension PreferencesViewController { return false } - let timezone1 = NSTimeZone(name: object1.timezoneID!) - let timezone2 = NSTimeZone(name: object2.timezoneID!) + let timezone1 = NSTimeZone(name: object1.timezone()) + let timezone2 = NSTimeZone(name: object2.timezone()) let difference1 = system.secondsFromGMT() - timezone1!.secondsFromGMT let difference2 = system.secondsFromGMT() - timezone2!.secondsFromGMT