Noda Time
Show / Hide Table of Contents

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 net6.0, net8.0, 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 net6.0, net8.0, 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 net6.0, net8.0, 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 net6.0, net8.0, netstandard2.0
Declaration
public static IDateTimeZoneProvider Tzdb { get; }
Property Value
Type Description
IDateTimeZoneProvider A time zone provider using a TzdbDateTimeZoneSource.
In this article
Back to top Generated by DocFX