ServerUtils.GetCurrentUserNow method
Returns DateTime.Now in the current user's configured timezone.
Namespace: Microsoft.PerformancePoint.Scorecards.ServerCommon
Assembly: Microsoft.PerformancePoint.Scorecards.ServerCommon (in Microsoft.PerformancePoint.Scorecards.ServerCommon.dll)
Syntax
'Declaration
Public Shared Function GetCurrentUserNow As DateTime
'Usage
Dim returnValue As DateTime
returnValue = ServerUtils.GetCurrentUserNow()
public static DateTime GetCurrentUserNow()
Return value
Type: System.DateTime
DateTime.Now in the current user's configured timezone.
Remarks
You should not explicitly call DateTime.Now in server code because it does not take into account the SharePoint user or SharePoint-hosted timezone. If you get the AvoidUsingOSDependantTimezoneFunctions warning, use DateTime.UtcNow or call this method.
See also
Reference
Microsoft.PerformancePoint.Scorecards.ServerCommon namespace