ITimeZoneFactory Interface

Provides access to members that control the Time Zone Factory.

Description

The ITimeZoneFactory should be used whenever you need a reference to time zone. This is because the time zones are rules that are pre-defined, and using the pre-defined values saves memory, and prevents unnecessary errors. The time zone can be generated from well known ID (WKID) values, which can be queried from the time zone's Windows ID, or from the time zone's Olson ID.

Members

Name Description
Method CreateLocaleInfoFromLocaleID Obtains the locale display name that corresponds to the given locale ID.
Method CreateTimeReferenceFromWindowsID Creates a time reference from a windows ID.
Method CreateTimeZoneInfoFromWindowsID Creates a time zone info from a windows ID.
Read-only property FirstLocaleID The first locale ID.
Read-only property FirstTimeZoneWindowsID The first time zone windows ID.
Method IsValidLocaleID Returns whether a given locale ID is valid for creating a locale info.
Method IsValidTimeZoneWindowsID Returns whether a given time zone windows ID is valid for creating a time zone info or a time reference.
Read-only property NextLocaleID The locale ID that cyclicly proceeds the given locale ID.
Read-only property NextTimeZoneWindowsID The time zone windows ID that cyclicly proceeds the given time zone windows ID.
Method QueryLocalTimeZoneWindowsID Obtains the machine's current local time zone Windows ID.
Method QueryTimeZoneOlsonIDsFromWindowsID Obtains all the olson time zone IDs that correspond to the given time zone windows ID.
Method QueryTimeZoneWindowsIDFromOlsonID Returns the time zone windows ID that corresponds to the given olson time zone ID.

ITimeZoneFactory.CreateLocaleInfoFromLocaleID Method

Obtains the locale display name that corresponds to the given locale ID.

Public Function CreateLocaleInfoFromLocaleID ( _
    ByVal LocaleID As Integer _
) As ILocaleInfo
public ILocaleInfo CreateLocaleInfoFromLocaleID (
    int LocaleID
);

ITimeZoneFactory.CreateTimeReferenceFromWindowsID Method

Creates a time reference from a windows ID.

Public Function CreateTimeReferenceFromWindowsID ( _
    ByVal WindowsID As String _
) As ITimeReference
public ITimeReference CreateTimeReferenceFromWindowsID (
    string WindowsID
);

ITimeZoneFactory.CreateTimeZoneInfoFromWindowsID Method

Creates a time zone info from a windows ID.

Public Function CreateTimeZoneInfoFromWindowsID ( _
    ByVal WindowsID As String _
) As ITimeZoneInfo
public ITimeZoneInfo CreateTimeZoneInfoFromWindowsID (
    string WindowsID
);

ITimeZoneFactory.FirstLocaleID Property

The first locale ID.

Public ReadOnly Property FirstLocaleID As Integer
public int FirstLocaleID {get;}

ITimeZoneFactory.FirstTimeZoneWindowsID Property

The first time zone windows ID.

Public ReadOnly Property FirstTimeZoneWindowsID As String
public string FirstTimeZoneWindowsID {get;}

ITimeZoneFactory.IsValidLocaleID Method

Returns whether a given locale ID is valid for creating a locale info.

Public Function IsValidLocaleID ( _
    ByVal LocaleID As Integer _
) As Boolean
public bool IsValidLocaleID (
    int LocaleID
);

ITimeZoneFactory.IsValidTimeZoneWindowsID Method

Returns whether a given time zone windows ID is valid for creating a time zone info or a time reference.

Public Function IsValidTimeZoneWindowsID ( _
    ByVal WindowsID As String _
) As Boolean
public bool IsValidTimeZoneWindowsID (
    string WindowsID
);

ITimeZoneFactory.NextLocaleID Property

The locale ID that cyclicly proceeds the given locale ID.

Public Function get_NextLocaleID ( _
    ByVal currenteLocaleID As Integer _
) As Integer
public int get_NextLocaleID (
    int currenteLocaleID
);

ITimeZoneFactory.NextTimeZoneWindowsID Property

The time zone windows ID that cyclicly proceeds the given time zone windows ID.

Public Function get_NextTimeZoneWindowsID ( _
    ByVal currentTimeZoneWindowsID As String _
) As String
public string get_NextTimeZoneWindowsID (
    string currentTimeZoneWindowsID
);

ITimeZoneFactory.QueryLocalTimeZoneWindowsID Method

Obtains the machine's current local time zone Windows ID.

Public Function QueryLocalTimeZoneWindowsID ( _
) As String
public string QueryLocalTimeZoneWindowsID (
);

ITimeZoneFactory.QueryTimeZoneOlsonIDsFromWindowsID Method

Obtains all the olson time zone IDs that correspond to the given time zone windows ID.

Public Function QueryTimeZoneOlsonIDsFromWindowsID ( _
    ByVal WindowsID As String _
) As String[]
public String[] QueryTimeZoneOlsonIDsFromWindowsID (
    string WindowsID
);

ITimeZoneFactory.QueryTimeZoneWindowsIDFromOlsonID Method

Returns the time zone windows ID that corresponds to the given olson time zone ID.

Public Function QueryTimeZoneWindowsIDFromOlsonID ( _
    ByVal olsonID As String _
) As String
public string QueryTimeZoneWindowsIDFromOlsonID (
    string olsonID
);

Classes that implement ITimeZoneFactory

Classes Description
TimeZoneFactory An object that creates TimeZoneInfo instances.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.