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 Shared ReadOnly Property GlobalTimeZones As SPTimeZoneCollection
Dim value As SPTimeZoneCollection

value = SPRegionalSettings.GlobalTimeZones
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.

Dim timeZonesList As SPTimeZoneCollection = SPRegionalSettings.GlobalTimeZones
Dim timeZone As SPTimeZone

For Each timeZone In  timeZonesList
    Console.WriteLine(("Time Zone: " + timeZone.Description))
Next timeZone
SPTimeZoneCollection collTimeZonesAvailable = SPRegionalSettings.GlobalTimeZones; 

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

See also


SPRegionalSettings class

SPRegionalSettings members

Microsoft.SharePoint namespace