Noda Time
Show / Hide Table of Contents

Class TzdbDateTimeZoneSource

Provides an implementation of a IDateTimeZoneSource that looks for its time zone definitions from a named resource in an assembly.
Since 1.0.x
Availability net35-Client
Inheritance
Object
TzdbDateTimeZoneSource
Implements
IDateTimeZoneSource
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: NodaTime.TimeZones
Assembly: NodaTime.dll
Syntax
public sealed class TzdbDateTimeZoneSource : IDateTimeZoneSource
Remarks
All calls to ForId(String) for fixed-offset IDs advertised by the source (i.e. "UTC" and "UTC+/-Offset") will return zones equal to those returned by ForOffset(Offset).

Constructors

TzdbDateTimeZoneSource(ResourceManager)

Initializes a new instance of the TzdbDateTimeZoneSource class.
Since 1.0.x
Availability net35-Client
Declaration
public TzdbDateTimeZoneSource(ResourceManager source)
Parameters
Type Name Description
ResourceManager source The System.Resources.ResourceManager to search for the time zone resources.

TzdbDateTimeZoneSource(ResourceSet)

Initializes a new instance of the TzdbDateTimeZoneSource class.
Since 1.0.x
Availability net35-Client
Declaration
public TzdbDateTimeZoneSource(ResourceSet source)
Parameters
Type Name Description
ResourceSet source The System.Resources.ResourceSet to search for the time zone resources.

TzdbDateTimeZoneSource(String)

Initializes a new instance of the TzdbDateTimeZoneSource class.
Since 1.0.x
Availability net35-Client
Declaration
public TzdbDateTimeZoneSource(string baseName)
Parameters
Type Name Description
String baseName GetName of the base.

TzdbDateTimeZoneSource(String, Assembly)

Initializes a new instance of the TzdbDateTimeZoneSource class.
Since 1.0.x
Availability net35-Client
Declaration
public TzdbDateTimeZoneSource(string baseName, Assembly assembly)
Parameters
Type Name Description
String baseName GetName of the base.
Assembly assembly The assembly to search for the time zone resources.

Properties

VersionId

Returns a version identifier for this source.
Since 1.0.x
Availability net35-Client
Declaration
public string VersionId { get; }
Property Value
Type Description
String

Methods

ForId(String)

Returns the time zone definition associated with the given id.
Since 1.0.x
Availability net35-Client
Declaration
public DateTimeZone ForId(string id)
Parameters
Type Name Description
String id The id of the time zone to return.
Returns
Type Description
DateTimeZone The DateTimeZone or null if there is no time zone with the given id.

GetIds()

Returns a sequence of the available IDs from this source.
Since 1.0.x
Availability net35-Client
Declaration
public IEnumerable<string> GetIds()
Returns
Type Description
IEnumerable<String>

MapTimeZoneId(TimeZoneInfo)

Attempts to map the system time zone to a zoneinfo ID, and return that ID.
Since 1.0.x
Availability net35-Client
Declaration
public string MapTimeZoneId(TimeZoneInfo zone)
Parameters
Type Name Description
TimeZoneInfo zone
Returns
Type Description
String

Implements

IDateTimeZoneSource
In this article
Back to top Generated by DocFX