|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||Cocoa||MBS MacBase Plugin||12.3||Yes||No||No||Yes, macOS only||No|
Time zone objects represent geopolitical regions. Consequently, these objects have names for these regions. Time zone objects also represent a temporal offset, either plus or minus, from Greenwich Mean Time (GMT) and an abbreviation (such as PST for Pacific Standard Time).
NSTimeZone provides several class methods to get time zone objects: timeZoneWithName, timeZoneWithAbbreviation, and timeZoneForSecondsFromGMT. The class also permits you to set the default time zone within your application (setDefaultTimeZone). You can access this default time zone at any time with the defaultTimeZone class method, and with the localTimeZone class method, you can get a relative time zone object that decodes itself to become the default time zone for any locale in which it finds itself.
Cocoa does not provide any API to change the time zone of the computer, or of other applications.
Some NSCalendarDate methods return date objects that are automatically bound to time zone objects. These date objects use the functionality of NSTimeZone to adjust dates for the proper locale. Unless you specify otherwise, objects returned from NSCalendarDate are bound to the default time zone for the current locale.
Note that, strictly, time zone database entries such as "America/Los_Angeles" are IDs not names. An example of a time zone name is "Pacific Daylight Time". Although many NSTimeZone method names include the word "name", they refer to IDs.
- 7 properties
- property abbreviationDictionary as Dictionary
- 5 methods
- 6 shared methods
- shared method defaultTimeZone as NSTimeZoneMBS
- shared method knownTimeZoneNames as string()
- shared method localTimeZone as NSTimeZoneMBS
- shared method systemTimeZone as NSTimeZoneMBS
- shared method timeZoneForSecondsFromGMT(seconds as Integer) as NSTimeZoneMBS
- shared method timeZoneWithName(name as string) as NSTimeZoneMBS
This class has no sub classes.
Some methods using this class:
- CalEventMBS.setEndDate(d as date, tz as NSTimeZoneMBS)
- CalEventMBS.setStartDate(d as date, tz as NSTimeZoneMBS)
- EKEventMBS.setEndDate(d as date, tz as NSTimeZoneMBS)
- EKEventMBS.setStartDate(d as date, tz as NSTimeZoneMBS)
- NSCalendarMBS.componentsInTimeZone(timezone as NSTimeZoneMBS, date as Date) as NSDateComponentsMBS
- NSTextCheckingResultMBS.dateCheckingResult(Range as NSRangeMBS, date as Date, timeZone as NSTimeZoneMBS, duration as double) as NSTextCheckingResultMBS
Some properties using for this class:
- EKCalendarItemMBS.timeZone as NSTimeZoneMBS
- MKMapItemMBS.timeZone as NSTimeZoneMBS
- NSDateComponentsMBS.timeZone as NSTimeZoneMBS
- NSTextCheckingResultMBS.timeZone as NSTimeZoneMBS
- NSUserNotificationMBS.deliveryTimeZone as NSTimeZoneMBS
- NSCalendarMBS.timeZone as NSTimeZoneMBS
- NSDatePickerMBS.timeZone as NSTimeZoneMBS
- MBS Xojo Plugins, version 17.5pr4
- MBS Xojo / Real Studio Plugins, version 13.4pr4
- MBS Real Studio Plugins, version 12.3pr11
The items on this page are in the following plugins: MBS MacBase Plugin.
MBS Xojo Plugins