SPTimeZone.Description Property

Gets the description for the time zone.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public ReadOnly Property Description As String
    Get
'Usage
Dim instance As SPTimeZone
Dim value As String

value = instance.Description
public string Description { get; }

Property Value

Type: System.String
A string that contains the description.

Examples

The following code example displays the time zone description for all sites in the current site collection.

Dim siteCollection As New SPSite("https://localhost")
Dim subSites As SPWebCollection = siteCollection.AllWebs

Dim site As SPWeb
For Each site In  subSites
    Console.WriteLine(site.RegionalSettings.TimeZone.Description)
Next site
using (SPSite oSiteCollection = SPContext.Current.Site)
{
    SPWebCollection collWebsites = oSiteCollection.AllWebs;

    foreach (SPWeb oWebsite in collWebsites)
    {
        Console.WriteLine(oWebsite.RegionalSettings.TimeZone.Description);
        oWebsite.Dispose();
    }

}

Note

Certain objects implement the IDisposable interface, and you must avoid retaining these objects in memory after they are no longer needed. For information about good coding practices, see Disposing Objects.

See Also

Reference

SPTimeZone Class

SPTimeZone Members

Microsoft.SharePoint Namespace