Below is my solution to the Challenge for DayLight Savings Time.
If I use the class method of systemTimeZone it’s telling me (I think) that I am on Daylight savings time.
However, If I use an instance method for isDaylightSavingTime I am getting a 0 returned.
int main (int argc, const char * argv)
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSTimeZone *zone = [[NSTimeZone alloc] init]; // Create an instance NSTimeZone *c = [NSTimeZone systemTimeZone]; // Class method so don't need to create an instance NSLog(@"Time zone is %@\n", c);
BOOL z =[zone isDaylightSavingTime];
NSLog(@"Is it set to Daylight Savings time: %d\n", z); [pool drain]; return 0;