Type Property


An object that tracks the current system time zone.


class var local: TimeZone { get }


Use this property when you want an object that always reflects the current system time zone. Contrast this behavior with that of the system class property, which has its value cached until you manually clear it by calling the resetSystemTimeZone() method.

Although the time zone obtained here automatically updates with the system, it provides no indication when system settings change. To receive notification of time zone changes, add an observer to the NSSystemTimeZoneDidChange notification by using the addObserver(_:selector:name:object:).

See Also

Working with System Time Zones

class var system: TimeZone

The time zone currently used by the system.

class func resetSystemTimeZone()

Clears any time zone value cached for the system property.

class var `default`: TimeZone

The default time zone for the current app.