Class DateTimeZoneCache
Since 1.0.x
Availability net45, netstandard1.3
Inheritance
System.Object
DateTimeZoneCache
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: NodaTime.dll
Syntax
public sealed class DateTimeZoneCache : IDateTimeZoneProvider
Constructors
DateTimeZoneCache(IDateTimeZoneSource)
Since 1.0.x
Availability net45, netstandard1.3
Declaration
public DateTimeZoneCache(IDateTimeZoneSource source)
Parameters
Exceptions
See Also
Properties
Ids
Gets the list of valid time zone ids advertised by this provider.
Since 1.0.x
Availability net45, netstandard1.3
Declaration
public ReadOnlyCollection<string> Ids { get; }
Property Value
Type |
Description |
System.Collections.ObjectModel.ReadOnlyCollection<T><String> |
The IEnumerable<T> of string ids. (The value returned is never null.) |
See Also
Item[String]
Returns the time zone for the given ID.
Since 1.0.x
Availability net45, netstandard1.3
Declaration
public DateTimeZone this[string id] { get; }
Parameters
Type |
Name |
Description |
String |
id |
The time zone id to find. |
Property Value
Exceptions
See Also
VersionId
Gets the version ID of this provider. This is simply the
VersionId returned by
the underlying source.
Since 1.0.x
Availability net45, netstandard1.3
Declaration
public string VersionId { get; }
Property Value
Type |
Description |
String |
The version ID of this provider. (The value returned is never null.) |
See Also
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 net45, netstandard1.3
Declaration
public DateTimeZone GetSystemDefault()
Returns
Type |
Description |
DateTimeZone |
The provider-specific representation of the system default time zone.
(The value returned is never null.) |
Exceptions
See Also
GetZoneOrNull(String)
Returns the time zone for the given ID, if it's available.
Since 1.0.x
Availability net45, netstandard1.3
Declaration
public 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. |
See Also
Implements
Extension Methods
See Also