Class DateTimeZoneProviders
Static access to date/time zone providers built into Noda Time and for global configuration where this is unavoidable.
All properties are thread-safe, and the providers returned by the read-only properties cache their results.
Since 1.0.x
Availability netstandard2.0
Inheritance
Object
DateTimeZoneProviders
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: NodaTime
Assembly: NodaTime.dll
Syntax
public static class DateTimeZoneProviders
Properties
Bcl
Gets a time zone provider which uses a BclDateTimeZoneSource.
Since 1.0.x
Availability netstandard2.0
Declaration
public static IDateTimeZoneProvider Bcl { get; }
Property Value
Type | Description |
---|---|
IDateTimeZoneProvider | A time zone provider which uses a BclDateTimeZoneSource . |
Remarks
See note on BclDateTimeZone for details of some incompatibilities with the BCL.
In Noda Time 1.x and 2.x, this property 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.
Serialization
Gets the IDateTimeZoneProvider to use to interpret a time zone ID read as part of
XML serialization. This property is obsolete as of version 3.0; the functionality still exists
in DateTimeZoneProvider, which this property delegates
to. (The behavior has not changed; this is purely an exercise in moving/renaming.)
Since 1.2.x
Availability netstandard2.0
Declaration
[Obsolete("This property exists primarily for binary backward compatibility. Please use NodaTime.Xml.XmlSerializationSettings.DateTimeZoneProvider instead.")]
public static IDateTimeZoneProvider Serialization { get; set; }
Property Value
Type | Description |
---|---|
IDateTimeZoneProvider |
Tzdb
Gets a time zone provider which uses a TzdbDateTimeZoneSource.
The underlying source is Default, which is initialized from
resources within the NodaTime assembly.
Since 1.0.x
Availability netstandard2.0
Declaration
public static IDateTimeZoneProvider Tzdb { get; }
Property Value
Type | Description |
---|---|
IDateTimeZoneProvider | A time zone provider using a TzdbDateTimeZoneSource . |