Anyone tackle the TimeZone Challenge?

I’m having trouble determine the systemTimeZone. I have started by finding the current hour but if anyone can help me get started. Thanks.

#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
@autoreleasepool {

    NSDate *now = [[NSDate alloc] init];
    

    NSCalendar *cal = [NSCalendar currentCalendar];
    
    NSUInteger hour = [cal ordinalityOfUnit:NSCalendarUnitHour
                                    inUnit:NSCalendarUnitYear
                                    forDate:now];
    NSLog(@"This is the hour %lu of the year", hour);
    
    
    
    NSTimeZone *systemTimeZone = [[ CFTimeZoneIsDaylightSavingTime(CFTimeZoneRef tz, hour)]]
    
    
    
}
return 0;

}

#import <Foundation/Foundation.h>

int main (int argc, const char * argv[]) {
    @autoreleasepool {
        NSTimeZone * tz = [NSTimeZone localTimeZone];
        NSLog (@"%@", tz);
    }
    return 0;
}

Hi there! This is my solution:

#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        NSTimeZone *here = [NSTimeZone systemTimeZone];
        double saving = [here isDaylightSavingTime];
        if (saving < 1){
            NSLog(@"It is not Daylight Saving Time");
        } else {
            NSLog(@"It is Daylight Saving Time");
        }
        NSLog(@"Value: %.0f",saving);
    }
    return 0;
}

First I determine my systems timezone. After that, I am creating a double variable in which I determine whether my timezone is currently in DayLightSavingTime. (I am using a variable because the answer can only be yes or no, which the computer will give out as a 1 for YES or a 0 for NO. NOTE: That’s what I assume. And it has worked for me.)
After that I give the information out via an NSLog and I’m done.

As isDaylightSavingTime method returns a boolean, here is my solution

//
// main.m
// 05_tz
//
// Created by Jean-Raymond CHAUVIERE on 06/05/2021.
//

#import <Foundation/Foundation.h>

int main(int argc, const char * argv) {
@autoreleasepool {
NSTimeZone *tz = [NSTimeZone systemTimeZone] ;

    if ([tz isDaylightSavingTime]) {
        NSLog(@"\nsaving dayling time OK") ;
    } else {
        NSLog(@"\nNO saving dayling time") ;
    }
}
return 0;

}