Hi All,
Currently I having time zone issue when saving a record into CRM.
In my case, the field named "Get Date" has assigned a date time value : 2012-02-02 11:35:27 UTC+8
And I use the method from SDK to parse into JSON object.
From jsonEntity, I am able to see the "Get Date" has converted to UTC format, which is : 2012-02-02T03:35:27Z
var jsonEntity = window.JSON.stringify(object);
$.ajax({ type: "POST",
contentType: "application/json; charset=utf-8",
datatype: "json",
url: this._ODataPath() + type + "Set",
data: jsonEntity,
beforeSend: function (xhr) {
//Specifying this header ensures that the results will be returned as JSON.
xhr.setRequestHeader("Accept", "application/json");
},
success: function (data, textStatus, xhr) {
successCallback(data.d);
},
error: function (xhr, textStatus, errorThrown) {
errorCallback(SDK.JQuery._errorHandler(xhr));
}
});
},
However, when the save completed and I query the UTC date from filtered view, the value is incorrect : 2012-02-01 21:35:27
I tried to set CRM user personal setting to UTC+4, the value saved in CRM also incorrect : 2012-02-02 01:35:27
The only correct time zone is using UTC+2 in DB, 2012-02-02 03:35:27 which is same timezone with CRM server.
Anyone face this problem before?