

NSTimeZone provides several class methods to make time zone objects: timeZoneWithName:, timeZoneWithAbbreviation:, and timeZoneForSecondsFromGMT. For example, the user may want to specify that an appointment is in Greenwich Mean Time, because it is during a business trip to London next week. There are cases when it may be necessary to use arbitrary time zones. In most cases, the user’s default time zone should be used when creating date objects. Unless the default time zone has been otherwise set, it is the time zone set in System Preferences. By default, NSCalendar uses the default time zone for the application-or process-when the calendar object is created. You can create an NSTimeZone object and use it to set the time zone of an NSCalendar object. Time zones affect the values of date components that are calculated by calendar objects for a given NSDate object.
Add timezones in calendar for mac plus#
Time zone objects also represent a temporal offset, either plus or minus, from Greenwich Mean Time (GMT) and an abbreviation (such as PST). Consequently, these objects have region names. Time zone objects represent geopolitical regions.

NSTimeZone is an abstract class that defines the behavior of time zone objects. Fortunately, a little planning and the assistance of the NSTimeZone class ease this task considerably. Because tomorrow is different depending on the time zone, situations like this must be carefully accounted for. You have an application that displays all of the Major League Baseball games that happen tomorrow. Time zones can create numerous problems for applications.
