I’m really enjoying this book and appreciate all of the hands on opportunities. Since I was motoring through the book and got to chapter 23, and began feeling a little lost, I decided to go back and reread from chapter 12. It’s really been helpful.
My question is pretty basic, and hopefully I didn’t miss the answer elsewhere in the forum, but here it is:
When I run the following code I get the expected output of the date.
NSDate *now = [[NSDate alloc] init];
NSLog(@“The date is %@”, now);
If I understand this correctly - now - is an instance of NSDate on the heap and even though I did not use the class method date during the initialization the date was stored in the memory location pointed to by - now.
So, my question is about the following code:
NSTimeZone *tz = [[NSTimeZone alloc] init];
But here the output is (null). Why? Since I know I can use an instance method as in - bool dot = [tz isDaylightSavingsTime] and it works, why can’t I output what tz is?
I read through some of the documentation on NSTimeZone but I’m still unclear.
Thank you again. You guys are great. I hope to get a chance to come to the Ranch once I get through a couple of books.