---
title: "timeZoneWithName:data:"
framework: foundation
role: symbol
role_heading: Type Method
path: "foundation/nstimezone/timezonewithname:data:"
---

# timeZoneWithName:data:

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

## Declaration

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

## Parameters

- `tzName`: The ID for the time zone.
- `aData`: This parameter is ignored.

## Return Value

Return Value The time zone with the ID tzName.

## Discussion

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 timeZoneWithName: to get the time zone object for a given name.

## See Also

### Creating Time Zones

- [timeZoneWithName:](foundation/nstimezone/timezonewithname:.md)
- [init(name:)](foundation/nstimezone/init(name:).md)
- [init(name:data:)](foundation/nstimezone/init(name:data:).md)
- [init(abbreviation:)](foundation/nstimezone/init(abbreviation:).md)
- [init(forSecondsFromGMT:)](foundation/nstimezone/init(forsecondsfromgmt:).md)
- [knownTimeZoneNames](foundation/nstimezone/knowntimezonenames.md)
- [abbreviationDictionary](foundation/nstimezone/abbreviationdictionary.md)
