Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Time Zones

CFDate objects are all expressed as Greenwich Mean Time, or GMT. In order to convert a GMT date to your local time you must use a CFTimeZone object. A CFTimeZone represents a geopolitical region that has some temporal offset, either plus or minus, from GMT as well as an abbreviation—such as “PST”. In addition to familiar abbreviations, time zones are also named by country and region. For example the United States spans these times zones:

To make matters even more complex, any region may or may not be on Daylight Savings Time (DST).

In order to properly convert GMT to local time, you have to know which time zone you are in and if DST is in effect. Core Foundation uses time zone names, abbreviations, GMT offset, and DST information for a particular time zone obtained from a public-domain database maintained at ftp://elsie.nci.nih.gov//pub/. This database contains information representing the history of local time for many representative locations around the globe. The database is updated periodically to reflect changes made to GMT offsets and daylight-saving rules by political entities.

For examples of how to use CFDate and CFTimeZone, see the “Using Dates.”



< Previous PageNext Page > Hide TOC


Last updated: 2005-08-11




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice