CFTimeZone defines the behavior of time zone objects. 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).
CFTimeZone provides several functions to create time zone objects:
CFTimeZoneCreateWithTimeIntervalFromGMT(_:_:). CFTimeZone also permits you to set the default time zone within your application using the
CFTimeZoneSetDefault(_:) function. You can access this default time zone at any time with the
CFTimeZone is “toll-free bridged” with its Cocoa Foundation counterpart,
NSTimeZone. This means that the Core Foundation type is interchangeable in function or method calls with the bridged Foundation object. Therefore, in a method where you see an
NSTimeZone * parameter, you can pass in a
CFTimeZoneRef, and in a function where you see a
CFTimeZoneRef parameter, you can pass in an NSTimeZone instance. This fact also applies to concrete subclasses of NSTimeZone. See Toll-Free Bridged Types for more information on toll-free bridging.