ConvertUtcToAxUserTimeZone Method
Note: This API is now obsolete.
This member has a SecurityCriticalAttribute attribute, which restricts it to internal use by the .NET Framework for Silverlight class library. Application code that uses this member throws a MethodAccessException.[SECURITY CRITICAL]
Converts the supplied UTC time to AX user TimeZone.
If we are unable to get an AX Session the method is a no-op.
Namespace: Microsoft.Dynamics.Framework.Reports
Assembly: Microsoft.Dynamics.Framework.Reports (in Microsoft.Dynamics.Framework.Reports.dll)
Syntax
'Declaration
<SecurityCriticalAttribute> _
<ServiceContextRequiredAttribute> _
<ObsoleteAttribute("The ConvertUtcToAxUserTimeZone method is deprecated. Use the ConvertUtcToAxUserTimeZoneForUser method instead. For example, ConvertUtcToAxUserTimeZoneForUser(Parameters!Parameters.AX_CompanyName.Value, Parameters!AX_UserContext.Value, System.DateTime.UtcNow, "d", Parameters!AX_RenderingCulture.Value).")> _
Public Shared Function ConvertUtcToAxUserTimeZone ( _
companyName As String, _
dateTime As DateTime _
) As DateTime
'Usage
Dim companyName As String
Dim dateTime As DateTime
Dim returnValue As DateTime
returnValue = DataMethodUtility.ConvertUtcToAxUserTimeZone(companyName, _
dateTime)
[SecurityCriticalAttribute]
[ServiceContextRequiredAttribute]
[ObsoleteAttribute("The ConvertUtcToAxUserTimeZone method is deprecated. Use the ConvertUtcToAxUserTimeZoneForUser method instead. For example, ConvertUtcToAxUserTimeZoneForUser(Parameters!Parameters.AX_CompanyName.Value, Parameters!AX_UserContext.Value, System.DateTime.UtcNow, "d", Parameters!AX_RenderingCulture.Value).")]
public static DateTime ConvertUtcToAxUserTimeZone(
string companyName,
DateTime dateTime
)
[SecurityCriticalAttribute]
[ServiceContextRequiredAttribute]
[ObsoleteAttribute(L"The ConvertUtcToAxUserTimeZone method is deprecated. Use the ConvertUtcToAxUserTimeZoneForUser method instead. For example, ConvertUtcToAxUserTimeZoneForUser(Parameters!Parameters.AX_CompanyName.Value, Parameters!AX_UserContext.Value, System.DateTime.UtcNow, "d", Parameters!AX_RenderingCulture.Value).")]
public:
static DateTime ConvertUtcToAxUserTimeZone(
String^ companyName,
DateTime dateTime
)
Parameters
- companyName
Type: System.String
- dateTime
Type: System.DateTime
Return Value
Type: System.DateTime
A Datetime value in the current user's timezone.