{ "id": "171212", "key": "AC-5631", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "6", "description": "", "name": "Hold" }, "resolutiondate": "2018-06-19T11:14:52.000+0000", "created": "2018-02-28T10:05:03.000+0000", "labels": [ "7.0.2.GA", "ANDROID" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-06-19T11:14:53.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "In certain devices appears the bug i will describe below.\r\n\r\nFor example, when i run the following\r\n\r\nTi.API.info('2017-08-14T20:30:00.0Z');\r\n\r\nTi.API.info(new Date('2017-08-14T20:30:00.0Z'));\r\n\r\nTi.API.info(new Date('2017-08-14T20:30:00.0Z').getTimezoneOffset());\r\n\r\nTi.API.info(String.formatTime(new Date('2017-08-14T20:30:00.0Z'), 'long'));\r\n\r\nand i get the following result:\r\n\r\n[INFO] : 2017-08-14T20:30:00.0Z\r\n\r\n[INFO] : Mon Aug 14 2017 23:30:00 GMT+0300 (EEST)\r\n\r\n[INFO] : -180\r\n\r\n[INFO] : 12:30\r\n\r\n\r\nThe result is always the same, and doesn't take into account what timezone has the user set on his device.\r\n\r\nOnly on String.formatTime its taken into account.\r\n\r\nThank you", "attachment": [], "flagged": false, "summary": "Android: Timezone is ignored", "creator": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "435027", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, What are the devices that have the issue? Please share the details. Thanks. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-02-28T21:43:25.000+0000", "updated": "2018-02-28T21:43:25.000+0000" }, { "id": "435107", "author": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The following devices:\r\n\r\nXiaomi mi5\r\nXiaomi Redmi 4x\r\n", "updateAuthor": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-02T15:31:11.000+0000", "updated": "2018-03-02T15:31:11.000+0000" }, { "id": "437795", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~andreas.pingas], We don't think it's a bug. Talking about string output differences between Android and iOS, neither are technically wrong, they're just presenting the dates in different ways. In both cases, the given date objects are stored interpreted as universal time. The difference is that Android is outputting the UTC date in local time +/- timezone and iOS is outputting the UTC date as-is (same string given to the Date object) but doesn't output the timezone. Personally, I think Google V8 is handling this better because it clarifies the timezone and Apple's JavaScriptCore is not.\r\n\r\nBut in any case, this is why you should always use String.formatTime(). This is used to output the Date object to your liking. Notice that String.formatTime() outputs the Date object pretty much the same between Android and iOS.\r\n\r\nHope this helps. Let us know. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2018-05-20T06:29:52.000+0000", "updated": "2018-05-20T06:29:52.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }