LocalTimeFromUtcTimeRequest LocalTimeFromUtcTimeRequest LocalTimeFromUtcTimeRequest LocalTimeFromUtcTimeRequest Class


Contains the data that is needed to retrieve the local time for the specified Coordinated Universal Time (UTC).

public ref class LocalTimeFromUtcTimeRequest sealed : Microsoft::Xrm::Sdk::OrganizationRequest
public sealed class LocalTimeFromUtcTimeRequest : Microsoft.Xrm.Sdk.OrganizationRequest
type LocalTimeFromUtcTimeRequest = class
    inherit OrganizationRequest
Public NotInheritable Class LocalTimeFromUtcTimeRequest
Inherits OrganizationRequest


private void RetrieveLocalTimeFromUTCTime(DateTime utcTime)
    if (!_timeZoneCode.HasValue)
    var request = new LocalTimeFromUtcTimeRequest
            TimeZoneCode = _timeZoneCode.Value,
            UtcTime = utcTime.ToUniversalTime()
        var response = (LocalTimeFromUtcTimeResponse)svc.Execute(request);
Console.WriteLine(String.Concat("Calling LocalTimeFromUtcTimeRequest.  UTC time: ",utcTime.ToString("MM/dd/yyyy HH:mm:ss"), ". Local time: ",response.LocalTime.ToString("MM/dd/yyyy HH:mm:ss")));

The following example shows how to use this message. For this sample to work correctly, you must be connected to the server to get an IOrganizationService interface. For the complete sample, see the link later in this topic.



Message Availability

This message works regardless whether the caller is connected to the server or offline.


Pass an instance of this class to the Execute(OrganizationRequest) method, which returns an instance of the LocalTimeFromUtcTimeResponse class.


LocalTimeFromUtcTimeRequest() LocalTimeFromUtcTimeRequest() LocalTimeFromUtcTimeRequest() LocalTimeFromUtcTimeRequest()

Initializes a new instance of the LocalTimeFromUtcTimeRequest class.


ExtensionData ExtensionData ExtensionData ExtensionData

Gets or sets the structure that contains extra data. Optional.

(Inherited from OrganizationRequest)
Item[String] Item[String] Item[String] Item[String]

Gets or sets the indexer for the Parameters collection.

(Inherited from OrganizationRequest)
Parameters Parameters Parameters Parameters

Gets or sets the collection of parameters for the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
RequestId RequestId RequestId RequestId

Gets or sets the ID of an asynchronous operation (system job). Optional.

(Inherited from OrganizationRequest)
RequestName RequestName RequestName RequestName

Gets or sets the name of the request. Required, but is supplied by derived classes.

(Inherited from OrganizationRequest)
TimeZoneCode TimeZoneCode TimeZoneCode TimeZoneCode

Gets or sets the time zone code.

UtcTime UtcTime UtcTime UtcTime

Gets or sets the Coordinated Universal Time (UTC).

Applies to

See also