Contents

CFTimeZone

Declaration

class CFTimeZone

Overview

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: CFTimeZoneCreateWithName(_:_:_:) and 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 CFTimeZoneCopyDefault() function.

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.

Topics

Creating a Time Zone

System and Default Time Zones and Information

Getting Information About Time Zones

Getting Daylight Savings Time Information

Getting the CFTimeZone Type ID

Data Types

Constants

See Also

Related Documentation

  • Date and Time Programming Guide for Core Foundation

Opaque Types