[Previous]
[Up]
[Next]
NSTimeZone
Authors
- Richard Frith-Macdonald
-
Version: $Revision$
Date: $Date$
Declared in: Foundation/NSTimeZone.h
Inherits from: NSObject
Conforms to: NSCoding
If the GNUstep time zone datafiles become too out of date, one
can download an updated database from ftp://elsie.nci.nih.gov/pub/
and compile it as specified in the README file in the
NSTimeZones directory.
Time zone names in NSDates should be GMT, MET etc. not
Europe/Berlin, America/Washington etc.
The problem with this is that various time zones may use the
same abbreviation (e.g. Australia/Brisbane and
America/New_York both use EST), and some time zones
may have different rules for daylight saving time even if the
abbreviation and offsets from UTC are the same.
The problems with depending on the OS for providing time zone
info are that some methods for the NSTimeZone classes might be
difficult to implement, and also that time zone names may vary
wildly between OSes (this could be a big problem when
archiving is used between different systems).
Instance Variables
Methods
Class Methods
+ (NSDictionary*) abbreviationDictionary;
+ (NSTimeZone*) defaultTimeZone;
+ (NSTimeZone*) localTimeZone;
+ (NSArray*) knownTimeZoneNames;
+ (void) resetSystemTimeZone;
+ (void) setDefaultTimeZone: (NSTimeZone*)aTimeZone;
+ (NSTimeZone*) systemTimeZone;
+ (NSTimeZone*) timeZoneForSecondsFromGMT: (int)seconds;
+ (NSTimeZone*) timeZoneWithAbbreviation: (NSString*)abbreviation;
+ (NSTimeZone*) timeZoneWithName: (NSString*)aTimeZoneName;
+ (NSTimeZone*) timeZoneWithName: (NSString*)aTimeZoneName;
Instances Methods
- (NSString*) abbreviation;
- (NSString*) abbreviationForDate: (NSDate*)aDate;
- (NSData*) data;
- (NSString*) description;
- (id) initWithName: (NSString*)aName;
- (id) initWithName: (NSString*)aName;
- (BOOL) isDaylightSavingTime;
- (BOOL) isDaylightSavingTimeForDate: (NSDate*)aDate;
- (BOOL) isEqualToTimeZone: (NSTimeZone*)aTimeZone;
- (NSString*) name;
- (int) secondsFromGMT;
- (int) secondsFromGMTForDate: (NSDate*)aDate;