New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

This Class defines the TimeZoneInfoProvider that implements the TimeZoneProviderBase and IDisposable.

Definition

Constructors

C#
public TimeZoneInfoProvider()
C#
public TimeZoneInfoProvider(string timeZoneId)
Parameters:timeZoneIdstring

Methods

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

C#
public void Dispose()

Implements: IDisposable.Dispose()

C#
protected virtual void Dispose(bool disposing)
Parameters:disposingbool

Gets list of all time zones available on the system.

C#
public override List<TimeZoneNamePair> GetAllTimeZones()
Returns:

List<TimeZoneNamePair>

Returns list of all time zones available on the system.

Overrides: TimeZoneProviderBase.GetAllTimeZones()

Initializes the provider.

C#
public override void Initialize(string name, NameValueCollection config)
Parameters:namestring

The friendly name of the provider.

configNameValueCollection

A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider.

Exceptions: ArgumentNullException

The name of the provider is null.

ArgumentException

The name of the provider has a length of zero.

InvalidOperationException

An attempt is made to call Initialize(string, NameValueCollection) on a provider after the provider has already been initialized.

Overrides: ProviderBase.Initialize(string, NameValueCollection)

Locals to UTC.

C#
public override DateTime LocalToUtc(DateTime local)
Parameters:localDateTime

The local.

Returns:

DateTime

Overrides: TimeZoneProviderBase.LocalToUtc(DateTime)

UTCs to local.

C#
public override DateTime UtcToLocal(DateTime utc)
Parameters:utcDateTime

The UTC.

Returns:

DateTime

Overrides: TimeZoneProviderBase.UtcToLocal(DateTime)