[AC-4011] fireEvent with datetime object modify the datetime content
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2016-07-20T19:44:17.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | DateTime, SDK3.5.0, Ti.App.fireEvent |
Reporter | jmarty |
Assignee | Shak Hossain |
Created | 2016-07-07T10:06:14.000+0000 |
Updated | 2016-07-21T07:20:29.000+0000 |
Description
SDK used : 3.5.2.v20160311103211
I create a datetime in object and I fired this object with Ti.App.fireEvent() and in the result, my datetime value was modified.
Exemple :
//index.xml
//index.js
function doClick(e) {
var result = new Date("2016-07-07T00:00:00+02:00");
var evtData = {result: result};
Ti.App.fireEvent('test',evtData);
}
Ti.App.addEventListener('test', function(e){
Ti.API.error("Original date = 2016-07-07T00:00:00+02:00" + " - date received = " + JSON.stringify(e));
});
$.index.open();
CURRENT RESULT = 2016-07-06T22:00:28.928Z
WAITING RESULT = 2016-07-06T22:00:00.000Z
I see you are using an old SDK. Can you try with the latest SDK 5.3.1.GA. For me the above code shows with SDK 5.3.0.GA
Thanks.
If I use another SDK, all my project changes. To test with the latest SDK, I must update my sdk, my XCode ...etc I broke my project... I can't test with the latest SDK. But the SDK 3.5 is not updated ?