<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSTimeZone",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTimeZone"
  },
  "title" : "NSTimeZone"
}
-->

# NSTimeZone

Information about standard time conventions associated with a specific geopolitical region.

```
class NSTimeZone
```

## Overview

In Swift, this type bridges to [`TimeZone`](/documentation/Foundation/TimeZone); use [`NSTimeZone`](/documentation/Foundation/NSTimeZone) when you need reference semantics or other Foundation-specific behavior.

Time zones represent the standard time policies for a geopolitical region. Time zones have identifiers like “America/Los_Angeles” and can also be identified by abbreviations, such as PST for Pacific Standard Time. You can create time zone objects by ID with [`init(name:)`](/documentation/Foundation/NSTimeZone/init(name:)) and by abbreviation with [`init(abbreviation:)`](/documentation/Foundation/NSTimeZone/init(abbreviation:)).

> Note:
> Time zone database entries such as “America/Los_Angeles” are IDs, not names. An example of a time zone name is “Pacific Daylight Time”. Although many ``doc://com.apple.foundation/documentation/Foundation/NSTimeZone`` symbols include the word “name”, they actually refer to IDs.

Time zones can also represent a temporal offset—either plus or minus—from Greenwich Mean Time (GMT). For example, the temporal offset of Pacific Standard Time is 8 hours behind Greenwich Mean Time (GMT-8). You can create time zone objects with a temporal offset by using [`init(forSecondsFromGMT:)`](/documentation/Foundation/NSTimeZone/init(forSecondsFromGMT:)).

You typically work with system time zones rather than creating time zones by identifier or by offset. The [`system`](/documentation/Foundation/NSTimeZone/system) class property returns the time zone currently used by the system, if known. This value is cached once the property is accessed and doesn’t reflect any system time zone changes until you call the [`resetSystemTimeZone()`](/documentation/Foundation/NSTimeZone/resetSystemTimeZone()) method. The [`local`](/documentation/Foundation/NSTimeZone/local) class property returns an autoupdating proxy object that always returns the current time zone used by the system. You can also set the [`default`](/documentation/Foundation/NSTimeZone/default) class property to make your app run as if it were in a different time zone than the system.

> Tip:
> You can’t use ``doc://com.apple.foundation/documentation/Foundation/NSTimeZone`` APIs to change the time zone of the device or of other apps.

[`NSTimeZone`](/documentation/Foundation/NSTimeZone) is *toll-free bridged* with its Core Foundation counterpart, <doc://com.apple.documentation/documentation/CoreFoundation/CFTimeZone>. See [Toll-Free Bridging](https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/Toll-FreeBridgin/Toll-FreeBridgin.html#//apple_ref/doc/uid/TP40010810-CH2) for more information on toll-free bridging.

> Important:
> The Swift overlay to the Foundation framework provides the ``doc://com.apple.foundation/documentation/Foundation/TimeZone`` structure, which bridges to the ``doc://com.apple.foundation/documentation/Foundation/NSTimeZone`` class. For more information about value types, see <doc://com.apple.documentation/documentation/Swift/working-with-foundation-types>.

## Topics

### Working with System Time Zones

[`local`](/documentation/Foundation/NSTimeZone/local)

An object that tracks the current system time zone.

[`system`](/documentation/Foundation/NSTimeZone/system)

The time zone currently used by the system.

[`resetSystemTimeZone()`](/documentation/Foundation/NSTimeZone/resetSystemTimeZone())

Clears any time zone value cached for the [`system`](/documentation/Foundation/NSTimeZone/system) property.

[`default`](/documentation/Foundation/NSTimeZone/default)

The default time zone for the current app.

### Creating Time Zones

[`timeZoneWithName:`](/documentation/Foundation/NSTimeZone/timeZoneWithName:)

Returns the time zone object identified by a given identifier.

[`timeZoneWithName:data:`](/documentation/Foundation/NSTimeZone/timeZoneWithName:data:)

Returns the time zone with a given identifier whose data has been initialized using given data.

[`init(name:)`](/documentation/Foundation/NSTimeZone/init(name:))

Returns a time zone initialized with a given identifier.

[`init(name:data:)`](/documentation/Foundation/NSTimeZone/init(name:data:))

Initializes a time zone with a given identifier and time zone data.

[`init(abbreviation:)`](/documentation/Foundation/NSTimeZone/init(abbreviation:))

Returns the time zone object identified by a given abbreviation.

[`init(forSecondsFromGMT:)`](/documentation/Foundation/NSTimeZone/init(forSecondsFromGMT:))

Returns a time zone object offset from Greenwich Mean Time by a given number of seconds.

[`knownTimeZoneNames`](/documentation/Foundation/NSTimeZone/knownTimeZoneNames)

Returns an array of strings listing the IDs of all the time zones known to the system.

[`abbreviationDictionary`](/documentation/Foundation/NSTimeZone/abbreviationDictionary)

Returns a dictionary holding the mappings of time zone abbreviations to time zone names.

### Getting Time Zone Information

[`name`](/documentation/Foundation/NSTimeZone/name)

The geopolitical region ID that identifies the receiver.

[`abbreviation`](/documentation/Foundation/NSTimeZone/abbreviation)

The abbreviation for the receiver, such as “EDT” (Eastern Daylight Time).

[`abbreviation(for:)`](/documentation/Foundation/NSTimeZone/abbreviation(for:))

Returns the abbreviation for the receiver at a given date.

[`secondsFromGMT`](/documentation/Foundation/NSTimeZone/secondsFromGMT)

The current difference in seconds between the receiver and Greenwich Mean Time.

[`secondsFromGMT(for:)`](/documentation/Foundation/NSTimeZone/secondsFromGMT(for:))

Returns the difference in seconds between the receiver and Greenwich Mean Time at a given date.

[`data`](/documentation/Foundation/NSTimeZone/data)

The data that stores the information used by the receiver.

[`timeZoneDataVersion`](/documentation/Foundation/NSTimeZone/timeZoneDataVersion)

Returns the time zone data version.

[`NSTimeZone.NameStyle`](/documentation/Foundation/NSTimeZone/NameStyle)

Constants you use to specify a style when presenting time zone names.

### Working with Daylight Savings

[`isDaylightSavingTime`](/documentation/Foundation/NSTimeZone/isDaylightSavingTime)

A Boolean value that indicates whether the receiver is currently using daylight saving time.

[`isDaylightSavingTime(for:)`](/documentation/Foundation/NSTimeZone/isDaylightSavingTime(for:))

Indicates whether the receiver uses daylight saving time on a given date.

[`daylightSavingTimeOffset`](/documentation/Foundation/NSTimeZone/daylightSavingTimeOffset)

The current daylight saving time offset of the receiver.

[`daylightSavingTimeOffset(for:)`](/documentation/Foundation/NSTimeZone/daylightSavingTimeOffset(for:))

Returns the daylight saving time offset for a given date.

[`nextDaylightSavingTimeTransition`](/documentation/Foundation/NSTimeZone/nextDaylightSavingTimeTransition)

The date of the next daylight saving time transition for the receiver.

[`nextDaylightSavingTimeTransition(after:)`](/documentation/Foundation/NSTimeZone/nextDaylightSavingTimeTransition(after:))

Returns the next daylight saving time transition after a given date.

### Comparing Time Zones

[`isEqual(to:)`](/documentation/Foundation/NSTimeZone/isEqual(to:))

Indicates whether the receiver has the same name and data as the specified time zone.

### Describing Time Zones

[`localizedName(_:locale:)`](/documentation/Foundation/NSTimeZone/localizedName(_:locale:))

Returns the localized name of the time zone.

[`description`](/documentation/Foundation/NSTimeZone/description)

A textual description of the time zone including the name, abbreviation, offset from GMT, and whether or not daylight saving time is currently in effect.

### Recognizing Notifications

[`NSSystemTimeZoneDidChange`](/documentation/Foundation/NSNotification/Name-swift.struct/NSSystemTimeZoneDidChange)

A notification posted when the time zone changes.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)