Name
NSTimeZone — Mac OS X 10.0
Synopsis
This class represents a time zone—objects that store information about a geographic time zone, such as the name, abbreviation, time from GMT, whether or not daylight savings is in effect, and so on.
NSTimeZone
is toll-free bridged with the Core
Foundation type CFTimeZone
. As such,
NSTimeZone
objects can be used interchangeably
with the CFTimeZone
pointer type,
CFTimeZoneRef
.
|
@interface NSTimeZone : NSObject <NSCoding, NSCopying>
|
// Initializers
|
- (id)initWithName:(NSString *)tzName; |
- (id)initWithName:(NSString *)tzName data:(NSData *)aData; |
// Class Methods
|
+ (NSDictionary *)abbreviationDictionary;
|
+ (NSTimeZone *)defaultTimeZone;
|
+ (NSArray *)knownTimeZoneNames;
|
+ (NSTimeZone *)localTimeZone;
|
+ (void)resetSystemTimeZone;
|
+ (void)setDefaultTimeZone:(NSTimeZone *)aTimeZone; |
+ (NSTimeZone *)systemTimeZone;
|
+ (id)timeZoneForSecondsFromGMT:(int)seconds; |
+ (id)timeZoneWithAbbreviation:(NSString *)abbreviation; |
+ (id)timeZoneWithName:(NSString *)tzName; |
+ (id)timeZoneWithName:(NSString *)tzName data:(NSData *)aData; |
// Instance Methods
|
- (NSString *)abbreviation;
|
- (NSString *)abbreviationForDate:(NSDate *)aDate; |
- (NSData *)data;
|
- (NSString *)description;
|
- (BOOL)isDaylightSavingTime;
|
- (BOOL)isDaylightSavingTimeForDate:(NSDate *)aDate; |
- (BOOL)isEqualToTimeZone:(NSTimeZone *)aTimeZone; |
- (NSString ... |
Get Cocoa in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.