[This is preliminary documentation and is subject to change.]

C# | Visual Basic | Visual C++ |
DateTimeZone ForId( string id )
Function ForId ( _ id As String _ ) As DateTimeZone
DateTimeZone^ ForId( String^ id )

- id (String)
- The ID of the time zone to return. This must be one of the IDs returned by GetIds()()()().


Note that this is permitted to return a DateTimeZone that has a different ID to that requested, if the ID provided is an alias.
Note also that this method is not required to return the same DateTimeZone instance for successive requests for the same ID; however, all instances returned for a given ID must compare as equal.
It is advised that sources should document their behaviour regarding any fixed-offset timezones (i.e. "UTC" and "UTC+/-Offset") that are included in the list returned by GetIds()()()(). (These IDs will not be requested by DateTimeZoneCache, but any users calling into the source directly may care.)
The source need not attempt to cache time zones; caching is typically provided by DateTimeZoneCache.

Exception | Condition |
---|---|
ArgumentNullException | id is null. |
ArgumentException | id is not supported by this source. |
Assembly: NodaTime (Module: NodaTime.dll) Version: 1.2.0.0 (1.2.0)