Returns the time zone object identified by a given name or abbreviation.
- iOS 2.0+
- macOS 10.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The allocator object to use to allocate memory for the new time zone. Pass
NULLor kCFAllocatorDefault to use the current default allocator.
The name or abbreviation of the time zone to obtain. The name may be in any of the formats understood by the system, for example "EST", "Etc/GMT-2", "America/Argentina/Buenos_Aires", "Europe/Monaco", "US/Pacific", or "posixrules". For a complete list of system names, you can see the output of
Zone Copy Known Names()
nameis not an abbreviation and searches the time zone information directory for a matching name. If
true, tries to resolve
nameusing the abbreviation dictionary first before searching the information dictionary.
A time zone corresponding to
NULL if no match was found. Ownership follows the The Create Rule.