Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class NodaTime.​TimeZones.​BclDateTimeZoneSource

Assembly: NodaTime

Inheritance: object → BclDateTimeZoneSource

Implemented Interfaces

Provides an implementation of <see cref="T:NodaTime.TimeZones.IDateTimeZoneSource" /> that loads data from the BCL <see cref="T:System.TimeZoneInfo" /> class.

Remarks

<para> All calls to <see cref="M:NodaTime.TimeZones.BclDateTimeZoneSource.ForId(System.String)" /> return instances of <see cref="T:NodaTime.TimeZones.BclDateTimeZone" />, including for fixed-offset IDs (i.e. "UTC" and "UTC+/-Offset"). </para> <para> 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. </para>

Properties

public string
VersionId
Returns an appropriate version ID for diagnostic purposes, which must not be null.
Remarks This source returns a string such as "TimeZoneInfo: 3.5.0.0" corresponding to the version of the assembly containing <see cref="T:System.TimeZoneInfo" /> .

Methods

GetIds​()
Returns the IDs of all system time zones.
Returns The IDs available from this source.
ForId​(string id)
Creates a new instance of <see cref="T:NodaTime.TimeZones.BclDateTimeZone" /> from the <see cref="T:System.TimeZoneInfo" /> with the given ID. The ID must be a known system time zone ID.
Returns The Noda Time representation of the given BCL time zone
id The ID of the system time zone to convert
public string
GetSystemDefaultId​()
Returns this source's ID for the system default time zone.
Returns 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.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object