<!--
{
  "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/ISO8601FormatStyle/timeZoneSeparator(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation4DateV18ISO8601FormatStyleV17timeZoneSeparatoryA2E04TimegH0OF"
  },
  "title" : "timeZoneSeparator(_:)"
}
-->

# timeZoneSeparator(_:)

Modifies the ISO 8601 date format style to use the specified time zone separator.

```
func timeZoneSeparator(_ separator: Date.ISO8601FormatStyle.TimeZoneSeparator) -> Date.ISO8601FormatStyle
```

## Parameters

`separator`

Character used to separate the time and time zone in a date.

## Return Value

An ISO 8601 date format style modified to include the specified time zone separator style.

## Discussion

Possible values of [`Date.ISO8601FormatStyle.TimeZoneSeparator`](/documentation/Foundation/Date/ISO8601FormatStyle/TimeZoneSeparator-swift.enum) are [`Date.ISO8601FormatStyle.TimeZoneSeparator.colon`](/documentation/Foundation/Date/ISO8601FormatStyle/TimeZoneSeparator-swift.enum/colon) and [`Date.ISO8601FormatStyle.TimeZoneSeparator.omitted`](/documentation/Foundation/Date/ISO8601FormatStyle/TimeZoneSeparator-swift.enum/omitted).

For more information about ISO 8601 formatted dates, see the [`Date.ISO8601FormatStyle`](/documentation/Foundation/Date/ISO8601FormatStyle).

---

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)