<!--
{
  "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/timeZoneWithName:data:",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTimeZone(cm)timeZoneWithName:data:"
  },
  "title" : "timeZoneWithName:data:"
}
-->

# timeZoneWithName:data:

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

```
+ (instancetype) timeZoneWithName:(NSString *) tzName data:(NSData *) aData;
```

## Parameters

`tzName`

The ID for the time zone.

`aData`

This parameter is ignored.

## Return Value

The time zone with the ID `tzName`.

## 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/timeZoneWithName:`` to get the time zone object for 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)