<!--
{
  "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/init(name:data:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTimeZone(im)initWithName:data:"
  },
  "title" : "init(name:data:)"
}
-->

# init(name:data:)

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

```
init?(name tzName: String, data aData: Data?)
```

## Parameters

`tzName`

The identifier for the time zone. Providing `nil` for this parameter raises an invalid argument exception.

`aData`

This parameter is ignored.

## Discussion

As of macOS 10.6, the underlying implementation of this method has been changed to ignore the specified `data` parameter.

> Important:
> You should not use this method. Instead, use ``doc://com.apple.foundation/documentation/Foundation/NSTimeZone/init(name:)`` to initialize a time zone object with a given name.

---

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)