Compartilhar via


SPUtility.GetServerNow Method

Returns in Coordinated Universal Time (UTC) the current date and time used on the database server for the specified 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 GetServerNow ( _
    web As SPWeb _
) As DateTime
'Usage
Dim web As SPWeb
Dim returnValue As DateTime

returnValue = SPUtility.GetServerNow(web)
public static DateTime GetServerNow(
    SPWeb web
)

Parameters

Return Value

Type: System.DateTime
A System.DateTime value that indicates the current date and time on the database server.

See Also

Reference

SPUtility Class

SPUtility Members

Microsoft.SharePoint.Utilities Namespace