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 net35-Client, PCL
Inheritance
Object
DateTimeZoneProviders
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: NodaTime
Assembly: NodaTime.dll
Syntax
public static class DateTimeZoneProviders

Properties

Bcl

Gets a time zone provider which uses a BclDateTimeZoneSource. This property is not available on the PCL build of Noda Time.
Since 1.0.x
Availability net35-Client
Declaration
public static IDateTimeZoneProvider Bcl { get; }
Property Value
Type Description
IDateTimeZoneProvider

Default

Gets the TZDB time zone provider. This always returns the same value as the Tzdb property.
Since 1.0.x
Availability net35-Client
Declaration
[Obsolete("Use DateTimeZoneProviders.Tzdb instead")]
public static IDateTimeZoneProvider Default { get; }
Property Value
Type Description
IDateTimeZoneProvider
Remarks
This method is not available in the PCL version, as it was made obsolete in Noda Time 1.1.
See Also
Tzdb

Serialization

The IDateTimeZoneProvider to use to interpret a time zone ID read as part of XML or binary serialization.
Since 1.2.x
Availability net35-Client, PCL
Declaration
public static IDateTimeZoneProvider Serialization { get; set; }
Property Value
Type Description
IDateTimeZoneProvider
Remarks
This property defaults to Tzdb. The mere existence of this property is unfortunate, but XML and binary serialization in .NET provide no simple way of configuring appropriate context. It is expected that any single application is unlikely to want to serialize ZonedDateTime values using different time zone providers.

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 net35-Client, PCL
Declaration
public static IDateTimeZoneProvider Tzdb { get; }
Property Value
Type Description
IDateTimeZoneProvider
In this article
Back to top Generated by DocFX