How to find out that systemTimeZone does the init?



I read all of the discussions concerning the different initializations and I think I got them.
I also could follow the informations in the Xcode documentation.

The only thing I’m wondering about is the fact that systemTimeZone obviously initializes the NSTimeZone instance? How should I have found that out without that book. Because looking in the Xcode documentation the systemTimeZone method is not listed in the section “Creating and Initializing Time Zone Objects” which I would have expected in that case?!?

So how would I have found that out? Do I miss something in the documentation?

Thanks a lot for all of your help for us nerds… ;o)


Good question. I don’t think you missed anything explicit; this is quite subtle, and probably an unusual case.

The documentation is effectively separating the two use cases for time zones here. “Creating and Initializing” is for situations where you want to manipulate time zones conceptually, perhaps when working with calendars, setting an appointment for months out; “Working with System” details the methods to retrieve or modify the application’s idea of the current time zone.

Many class methods will return an instance of the class, so if you want to keep an eye open for this in the future, always scan the list of methods for anything preceded by a + sign.

Sorry I don’t have a better answer; perhaps one of the BNR guys has a better feel for why this class documentation doesn’t conform to the usual structure.


Thanks macintux. Better than nothing. ;o)

Especially that hint with the “+” is helpful. With that information I will be able to find the methods even in other documentation sections.
So that’s fine enough for me for the moment.