Interface IDateTimeZoneProvider
Provides stable, performant time zone data.
Since 1.0.x
Availability net35-Client
Assembly: NodaTime.dll
Syntax
public interface IDateTimeZoneProvider
Properties
Ids
Gets the list of valid time zone ids advertised by this provider.
Since 1.0.x
Availability net35-Client
Declaration
ReadOnlyCollection<string> Ids { get; }
Property Value
Type |
Description |
ReadOnlyCollection<String> |
The System.Collections.Generic.IEnumerable<T> of string ids. |
Item[String]
Returns the time zone for the given ID.
Since 1.0.x
Availability net35-Client
Declaration
DateTimeZone this[string id] { get; }
Parameters
Type |
Name |
Description |
String |
id |
The time zone id to find. |
Property Value
Exceptions
Type |
Condition |
System.TimeZoneNotFoundException |
This provider does not support the given ID. |
System.ArgumentNullException |
id is null. |
VersionId
The version ID of this provider.
Since 1.0.x
Availability net35-Client
Declaration
string VersionId { get; }
Property Value
Methods
GetSystemDefault()
Gets the time zone from this provider that matches the system default time zone, if a matching time zone is
available.
Since 1.0.x
Availability net35-Client
Declaration
DateTimeZone GetSystemDefault()
Returns
Type |
Description |
DateTimeZone |
The provider-specific representation of the system default time zone.
|
Exceptions
Type |
Condition |
System.TimeZoneNotFoundException |
The system default time zone is not mapped by
this provider. |
GetZoneOrNull(String)
Returns the time zone for the given ID, if it's available.
Since 1.0.x
Availability net35-Client
Declaration
DateTimeZone GetZoneOrNull(string id)
Parameters
Type |
Name |
Description |
String |
id |
The time zone ID to find. |
Returns
Exceptions
Type |
Condition |
System.ArgumentNullException |
id is null. |