---
title: "init(name:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nstimezone/init(name:)"
---

# init(name:)

Returns a time zone initialized with a given identifier.

## Declaration

```swift
init?(name tzName: String)
```

## Parameters

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

## Return Value

Return Value A time zone object initialized with the identifier tzName.

## Discussion

Discussion If tzName is a known identifier, this method calls init(name:data:) with the appropriate data object.

## See Also

### Creating Time Zones

- [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)
