SPRegionalSettings.GlobalTimeZones property

Gets the time zones that are recognized on the server that is running SharePoint Foundation.

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

public static SPTimeZoneCollection GlobalTimeZones { get; }

Property value

Type: Microsoft.SharePoint.SPTimeZoneCollection
An SPTimeZoneCollection object that represents the time zones that are recognized on the SharePoint Foundation server. This list of time zones is different from the Windows Server time zones.

The following code example displays all the time zones defined in SharePoint Foundation.

SPTimeZoneCollection collTimeZonesAvailable = SPRegionalSettings.GlobalTimeZones; 

foreach (SPTimeZone oTimeZoneAvailable in collTimeZonesAvailable) 
    Console.WriteLine("Time Zone: " + oTimeZoneAvailable.Description);