CFTimeZone
Declaration
class CFTimeZoneOverview
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
CFTimeZoneCreateWithName(_:_:_:)CFTimeZoneCreateWithTimeIntervalFromGMT(_:_:)CFTimeZoneCreate(_:_:_:)
System and Default Time Zones and Information
CFTimeZoneCopyAbbreviationDictionary()CFTimeZoneCopyAbbreviation(_:_:)CFTimeZoneCopyDefault()CFTimeZoneCopySystem()CFTimeZoneSetDefault(_:)CFTimeZoneCopyKnownNames()CFTimeZoneResetSystem()CFTimeZoneSetAbbreviationDictionary(_:)
Getting Information About Time Zones
CFTimeZoneGetName(_:)CFTimeZoneCopyLocalizedName(_:_:_:)CFTimeZoneGetSecondsFromGMT(_:_:)CFTimeZoneGetData(_:)
Getting Daylight Savings Time Information
CFTimeZoneIsDaylightSavingTime(_:_:)CFTimeZoneGetDaylightSavingTimeOffset(_:_:)CFTimeZoneGetNextDaylightSavingTimeTransition(_:_:)
Getting the CFTimeZone Type ID
Data Types
Constants
See Also
Related Documentation
- Date and Time Programming Guide for Core Foundation