2 * Copyright (c) 2008 Apple Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
24 Copyright (c) 1998-2007, Apple Inc. All rights reserved.
27 #if !defined(__COREFOUNDATION_CFTIMEZONE__)
28 #define __COREFOUNDATION_CFTIMEZONE__ 1
30 #include <CoreFoundation/CFBase.h>
31 #include <CoreFoundation/CFArray.h>
32 #include <CoreFoundation/CFData.h>
33 #include <CoreFoundation/CFDate.h>
34 #include <CoreFoundation/CFDictionary.h>
35 #include <CoreFoundation/CFString.h>
40 CFTypeID
CFTimeZoneGetTypeID(void);
43 CFTimeZoneRef
CFTimeZoneCopySystem(void);
46 void CFTimeZoneResetSystem(void);
49 CFTimeZoneRef
CFTimeZoneCopyDefault(void);
52 void CFTimeZoneSetDefault(CFTimeZoneRef tz
);
55 CFArrayRef
CFTimeZoneCopyKnownNames(void);
58 CFDictionaryRef
CFTimeZoneCopyAbbreviationDictionary(void);
61 void CFTimeZoneSetAbbreviationDictionary(CFDictionaryRef dict
);
64 CFTimeZoneRef
CFTimeZoneCreate(CFAllocatorRef allocator
, CFStringRef name
, CFDataRef data
);
67 CFTimeZoneRef
CFTimeZoneCreateWithTimeIntervalFromGMT(CFAllocatorRef allocator
, CFTimeInterval ti
);
70 CFTimeZoneRef
CFTimeZoneCreateWithName(CFAllocatorRef allocator
, CFStringRef name
, Boolean tryAbbrev
);
73 CFStringRef
CFTimeZoneGetName(CFTimeZoneRef tz
);
76 CFDataRef
CFTimeZoneGetData(CFTimeZoneRef tz
);
79 CFTimeInterval
CFTimeZoneGetSecondsFromGMT(CFTimeZoneRef tz
, CFAbsoluteTime at
);
82 CFStringRef
CFTimeZoneCopyAbbreviation(CFTimeZoneRef tz
, CFAbsoluteTime at
);
85 Boolean
CFTimeZoneIsDaylightSavingTime(CFTimeZoneRef tz
, CFAbsoluteTime at
);
88 CFTimeInterval
CFTimeZoneGetDaylightSavingTimeOffset(CFTimeZoneRef tz
, CFAbsoluteTime at
) AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
;
91 CFAbsoluteTime
CFTimeZoneGetNextDaylightSavingTimeTransition(CFTimeZoneRef tz
, CFAbsoluteTime at
) AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
;
93 #if MAC_OS_X_VERSION_10_5 <= MAC_OS_X_VERSION_MAX_ALLOWED
95 kCFTimeZoneNameStyleStandard
,
96 kCFTimeZoneNameStyleShortStandard
,
97 kCFTimeZoneNameStyleDaylightSaving
,
98 kCFTimeZoneNameStyleShortDaylightSaving
100 typedef CFIndex CFTimeZoneNameStyle
;
103 CFStringRef
CFTimeZoneCopyLocalizedName(CFTimeZoneRef tz
, CFTimeZoneNameStyle style
, CFLocaleRef locale
) AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
;
107 const CFStringRef kCFTimeZoneSystemTimeZoneDidChangeNotification AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER
;
111 #endif /* ! __COREFOUNDATION_CFTIMEZONE__ */