Class BclDateTimeZoneSource
Implements
Inherited Members
Namespace: NodaTime.TimeZones
Assembly: NodaTime.dll
Syntax
public sealed class BclDateTimeZoneSource : IDateTimeZoneSource
Remarks
All calls to ForId(String) return instances of BclDateTimeZone, including for fixed-offset IDs (i.e. "UTC" and "UTC+/-Offset").
In Noda Time 1.x and 2.x, this class is only available on the .NET Framework builds of Noda Time, and not the PCL (Noda Time 1.x) or .NET Standard 1.3 (Noda Time 2.x) builds.
Constructors
BclDateTimeZoneSource()
Declaration
public BclDateTimeZoneSource()
Remarks
All calls to ForId(String) return instances of BclDateTimeZone, including for fixed-offset IDs (i.e. "UTC" and "UTC+/-Offset").
In Noda Time 1.x and 2.x, this class is only available on the .NET Framework builds of Noda Time, and not the PCL (Noda Time 1.x) or .NET Standard 1.3 (Noda Time 2.x) builds.
Properties
VersionId
Declaration
public string VersionId { get; }
Property Value
Type | Description |
---|---|
String | An appropriate version ID for diagnostic purposes. |
Remarks
Methods
ForId(String)
Declaration
public BclDateTimeZone ForId(string id)
Parameters
Type | Name | Description |
---|---|---|
String | id | The ID of the system time zone to convert |
Returns
Type | Description |
---|---|
BclDateTimeZone | The Noda Time representation of the given BCL time zone |
Remarks
All calls to ForId(String) return instances of BclDateTimeZone, including for fixed-offset IDs (i.e. "UTC" and "UTC+/-Offset").
In Noda Time 1.x and 2.x, this class is only available on the .NET Framework builds of Noda Time, and not the PCL (Noda Time 1.x) or .NET Standard 1.3 (Noda Time 2.x) builds.
Exceptions
Type | Condition |
---|---|
ArgumentException | The given zone doesn't exist. |
GetIds()
Declaration
public IEnumerable<string> GetIds()
Returns
Type | Description |
---|---|
IEnumerable<String> | The IDs available from this source. |
Remarks
All calls to ForId(String) return instances of BclDateTimeZone, including for fixed-offset IDs (i.e. "UTC" and "UTC+/-Offset").
In Noda Time 1.x and 2.x, this class is only available on the .NET Framework builds of Noda Time, and not the PCL (Noda Time 1.x) or .NET Standard 1.3 (Noda Time 2.x) builds.
GetSystemDefaultId()
Declaration
public string GetSystemDefaultId()
Returns
Type | Description |
---|---|
String | The ID for the system default time zone for this source, or null if the system default time zone has no mapping in this source. |
Remarks
All calls to ForId(String) return instances of BclDateTimeZone, including for fixed-offset IDs (i.e. "UTC" and "UTC+/-Offset").
In Noda Time 1.x and 2.x, this class is only available on the .NET Framework builds of Noda Time, and not the PCL (Noda Time 1.x) or .NET Standard 1.3 (Noda Time 2.x) builds.
Explicit Interface Implementations
IDateTimeZoneSource.ForId(String)
Declaration
DateTimeZone IDateTimeZoneSource.ForId(string id)
Parameters
Type | Name | Description |
---|---|---|
String | id |
Returns
Type | Description |
---|---|
DateTimeZone |