Type Property

defaultTimeZone

The default time zone for the current app.

Declaration

@property(class, copy) NSTimeZone *defaultTimeZone;

Discussion

If no defaultTimeZone time zone has been set, the current system time zone is used. If the current system time zone cannot be determined, the GMT time zone is used instead.

The defaultTimeZone time zone is used by the app for date and time operations. You can set it to cause the app to run as if it were in a different time zone. Setting the defaultTimeZone property clears any value that was previously set.

If you access the defaultTimeZone class property, assign its value to a variable, and set a new defaultTimeZone time zone, the object stored in the variable doesn't update to reflect the new defaultTimeZone time zone. Contrast this behavior with that of the localTimeZone class property, which returns a proxy object that always reflects the current system time zone.

See Also

Working with System Time Zones

localTimeZone

An object that tracks the current system time zone.

systemTimeZone

The time zone currently used by the system.

+ resetSystemTimeZone

Clears any time zone value cached for the systemTimeZone property.