다음을 통해 공유


SPUtility.GetTimeSpanFromTimeZone Method

Retrieves a TimeSpan object that represents the difference in time between Coordinated Universal Time (UTC) and the time zone that is local to the SharePoint Web site.

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

Syntax

'Declaration
Public Shared Function GetTimeSpanFromTimeZone ( _
    timeZone As SPTimeZone _
) As TimeSpan
'Usage
Dim timeZone As SPTimeZone
Dim returnValue As TimeSpan

returnValue = SPUtility.GetTimeSpanFromTimeZone(timeZone)
public static TimeSpan GetTimeSpanFromTimeZone(
    SPTimeZone timeZone
)

Parameters

Return Value

Type: System.TimeSpan
A TimeSpan object that represents the current difference in time between UTC and local time, including any adjustment necessary for Daylight Savings Time, if it is in effect.

See Also

Reference

SPUtility Class

SPUtility Members

Microsoft.SharePoint.Utilities Namespace