This documentation is archived and is not being maintained.

SPUtility.GetServerNow Method

Windows SharePoint Services 3

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)

public static DateTime GetServerNow(
	SPWeb web
)

Parameters

web
Type: Microsoft.SharePoint.SPWeb
A Microsoft.SharePoint.SPWeb object that represents the site.

Return Value

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