<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation4DateV11FormatStyleV6SymbolV8TimeZoneV"
  },
  "title" : "Date.FormatStyle.Symbol.TimeZone"
}
-->

# Date.FormatStyle.Symbol.TimeZone

A type that specifies a format for the time zone in a date format style.

```
struct TimeZone
```

## Overview

The type [`Date.FormatStyle.Symbol.TimeZone`](/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone) includes static factory variables and methods that create custom [`Date.FormatStyle.Symbol.TimeZone`](/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone) objects:

|Factory variable                                                                                         |Description                                                                                                                              |
|---------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|
|``doc://com.apple.foundation/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/specificName(_:)``|The specific, non-location representation of a timezone. For example, `CDT` (`short`), `Central Daylight Time` (`long`).                 |
|``doc://com.apple.foundation/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/genericName(_:)`` |The generic, non-location representation of a timezone. For example, `CT` (`short`), `Central Time` (`long`).                            |
|``doc://com.apple.foundation/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/iso8601(_:)``     |The ISO 8601 representation of the timezone with hours, minutes, and optional seconds. For example, `-0500` (`short`), `-05:00` (`long`).|
|``doc://com.apple.foundation/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/localizedGMT(_:)``|The localized GMT format representation of a timezone. For example, `GMT-5` (`short`), `GMT-05:00` (`long`).                             |
|``doc://com.apple.foundation/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/identifier(_:)``  |The timezone identifier. For example, `uschi` (`short`), `America/Chicago` (`long`).                                                     |
|``doc://com.apple.foundation/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/exemplarLocation``|The exemplar city for a timezone. For example, `Chicago`.                                                                                |
|``doc://com.apple.foundation/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/genericLocation`` |The generic location representation of a timezone. For example, `Chicago Time`.                                                          |

To customize the hour format in a string representation of a `Date`, use [`timeZone(_:)`](/documentation/Foundation/Date/FormatStyle/timeZone(_:)). The following example shows a variety of [`Date.FormatStyle.Symbol.TimeZone`](/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone) format styles applied to a date.

```swift
let meetingDate = Date() // Feb 9, 2021 at 7:00 PM

meetingDate.formatted(Date.FormatStyle().timeZone(.specificName(.short)))
// CDT
meetingDate.formatted(Date.FormatStyle().timeZone(.specificName(.long)))
// Central Daylight Time

meetingDate.formatted(Date.FormatStyle().timeZone(.genericName(.short)))
// CT
meetingDate.formatted(Date.FormatStyle().timeZone(.genericName(.long)))
// Central Time

meetingDate.formatted(Date.FormatStyle().timeZone(.iso8601(.short)))
// -0500
meetingDate.formatted(Date.FormatStyle().timeZone(.iso8601(.long)))
// -05:00

meetingDate.formatted(Date.FormatStyle().timeZone(.localizedGMT(.short)))
// GMT-5
meetingDate.formatted(Date.FormatStyle().timeZone(.localizedGMT(.long)))
// GMT-05:00

meetingDate.formatted(Date.FormatStyle().timeZone(.identifier(.short)))
// uschi
meetingDate.formatted(Date.FormatStyle().timeZone(.identifier(.long)))
// America/Chicago

meetingDate.formatted(Date.FormatStyle().timeZone(.exemplarLocation))
// Chicago

meetingDate.formatted(Date.FormatStyle().timeZone(.genericLocation))
// Chicago Time
```

If you don’t provide a format, the system formats a timezone using the short [`specificName(_:)`](/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/specificName(_:)) static function with the width [`Date.FormatStyle.Symbol.TimeZone.Width.short`](/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/Width/short).

For more information about formatting dates, see the [`Date.FormatStyle`](/documentation/Foundation/Date/FormatStyle).

## Topics

### Modifying a Time Zone

[`static func specificName(Date.FormatStyle.Symbol.TimeZone.Width) -> Date.FormatStyle.Symbol.TimeZone`](/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/specificName(_:))

Returns the specific, non-location representation of a timezone.

[`static func genericName(Date.FormatStyle.Symbol.TimeZone.Width) -> Date.FormatStyle.Symbol.TimeZone`](/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/genericName(_:))

Returns the generic, non-location representation of a timezone.

[`static func iso8601(Date.FormatStyle.Symbol.TimeZone.Width) -> Date.FormatStyle.Symbol.TimeZone`](/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/iso8601(_:))

Creates the ISO 8601 representation of the timezone with hours, minutes, and optional seconds.

[`static func localizedGMT(Date.FormatStyle.Symbol.TimeZone.Width) -> Date.FormatStyle.Symbol.TimeZone`](/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/localizedGMT(_:))

Returns the localized GMT format representation of a timezone.

[`static func identifier(Date.FormatStyle.Symbol.TimeZone.Width) -> Date.FormatStyle.Symbol.TimeZone`](/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/identifier(_:))

Returns the timezone identifier.

[`static var exemplarLocation: Date.FormatStyle.Symbol.TimeZone`](/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/exemplarLocation)

The exemplar city for a timezone.

[`static var genericLocation: Date.FormatStyle.Symbol.TimeZone`](/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/genericLocation)

The generic location representation of a timezone.

### Comparing Time Zones

[`static func == (Date, Date) -> Bool`](/documentation/Foundation/Date/==(_:_:))

Returns true if the two `Date` values represent the same point in time.

### Supporting Enumerations

[`enum Width`](/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/Width)

A type representing the width of a timezone in a format style.

### Type Properties

[`static let omitted: Date.FormatStyle.Symbol.TimeZone`](/documentation/Foundation/Date/FormatStyle/Symbol/TimeZone/omitted)

The option for not including the symbol in the formatted output.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

---

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)