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 net45, netstandard1.3
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 .NET Standard 1.3 build of Noda Time.
Since 1.0.x
Availability net45
Declaration
public static IDateTimeZoneProvider Bcl { get; }
Property Value
Type | Description |
---|---|
IDateTimeZoneProvider | A time zone provider which uses a BclDateTimeZoneSource . (The value returned is never null.) |
Remarks
See note on BclDateTimeZone for details of some incompatibilities with the BCL.
Serialization
Gets the IDateTimeZoneProvider to use to interpret a time zone ID read as part of
XML or binary serialization.
Since 1.2.x
Availability net45, netstandard1.3
Declaration
public static IDateTimeZoneProvider Serialization { get; set; }
Property Value
Type | Description |
---|---|
IDateTimeZoneProvider | The IDateTimeZoneProvider to use to interpret a time zone ID read as part of
XML or binary serialization. (The value returned is never null.) |
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 net45, netstandard1.3
Declaration
public static IDateTimeZoneProvider Tzdb { get; }
Property Value
Type | Description |
---|---|
IDateTimeZoneProvider | A time zone provider using a TzdbDateTimeZoneSource . (The value returned is never null.) |