SPTimeZoneCollection Class

The SPTimeZoneCollection class represents a collection of SPTimeZone objects.

System.Object

   Microsoft.SharePoint.SPBaseCollection

      Microsoft.SharePoint.SPTimeZoneCollection

Public Properties

The following table shows the public properties of the SPTimeZoneCollection class, the data type of each property, and a brief description of each.

Name Data Type Description
Count Int32 Gets the number of time zones represented in the collection.
Item Microsoft.SharePoint.SPTimeZone Gets the time zone object at the specified index in the collection.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread safe.

Remarks

Use the TimeZones property of either the SPRegionalSettings or SPGlobalAdmin class to return the collection of time zones used in the site or in the deployment of Windows SharePoint Services. Use an indexer to return a single time zone from the collection. For example, if the collection is assigned to a variable named myTimeZones, use myTimeZones[index] in C#, or myTimeZones(index) in Visual Basic .NET, where index is the index number of the time zone in the collection.

Requirements

Namespace: Microsoft.SharePoint

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services (in Microsoft.SharePoint.dll)

Security: Code Access Security