SPRegionalSettings.GetTimeZoneIDByKeyName method

Returns a sharepoint timezone id that correlates to a given Windows Time Zone ID. Windows tzids are subkeys in the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Time Zones branch in the registry.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function GetTimeZoneIDByKeyName ( _
    keyName As String _
) As UShort
'Usage
Dim keyName As String
Dim returnValue As UShort

returnValue = SPRegionalSettings.GetTimeZoneIDByKeyName(keyName)
public static ushort GetTimeZoneIDByKeyName(
    string keyName
)

Parameters

Return value

Type: System.UInt16
Sharepoint timezone ID corresponding to the Windows tzid

See also

Reference

SPRegionalSettings class

SPRegionalSettings members

Microsoft.SharePoint namespace