Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TimeZoneInfo::Id Property

 

Gets the time zone identifier.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

public:
property String^ Id {
	String^ get();
}

Property Value

Type: System::String^

The time zone identifier.

The time zone identifier is a key string that uniquely identifies a particular time zone. In Windows XP and Windows Vista, it corresponds to the subkeys of the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Time Zone branch of the registry. It can be passed as a parameter to the FindSystemTimeZoneById method to retrieve a particular time zone from the registry.

System_CAPS_importantImportant

Although a key name in the Windows registry can be a maximum of 255 characters, we recommend that an identifier that you assign to a custom time zone be 32 characters or fewer. The longer the identifier, the greater the probability that an incorrect key name will be supplied when retrieving it.

The value of the Id property is usually, but not always, identical to that of the StandardName property. The identifier of the Coordinated Universal Time zone is UTC.

The following example lists the identifier of each of the time zones defined on the local computer.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 10
.NET Framework
Available since 3.5
Return to top
Show:
© 2017 Microsoft