{ "id": "123415", "key": "TIMOB-15908", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-12-06T18:32:22.000+0000", "created": "2013-12-06T06:10:17.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-3.2.0" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-12-11T10:36:15.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "getValue method for picker returns incorrect time for both PICKER_TYPE_DATE and \r\nPICKER_TYPE_DATE_AND_TIME Picker.\r\n\r\nWorks fine on Android.\r\n\r\nNot regression as issue occurs on 3.1.3.GA also.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n \r\nvar picker = Ti.UI.createPicker({\r\n\t type : Ti.UI.PICKER_TYPE_DATE_AND_TIME,\r\n\t selectionIndicator : true\r\n\t \r\n\t});\r\n\t \r\n\tvar showDate = Ti.UI.createButton({\r\n\t title : 'show date',\r\n\t bottom : 20\r\n\t});\r\n\tshowDate.addEventListener('click', function(e) {\r\n\t alert(picker.getValue());\r\n\t});\r\n\t \r\n\tvar view = Ti.UI.createView({\r\n\t width : Ti.UI.FILL,\r\n\t height : Ti.UI.FILL\r\n\t});\r\n\tview.add(picker);\r\n\tview.add(showDate);\r\n\t \r\n\twin.add(view);\r\n \r\nwin.open();\r\n{code}\r\n\r\nSteps to reproduce:\r\n1)Copy paste the code and run the app.\r\n2)Click on Show Date button.\r\n\r\nActual Result:\r\n2)Shows correct date and but incorrect time.\r\n\r\nExpected Result:\r\n2)Should show correct date and time.\r\n\r\n\r\nScreen Shot shows the device correct time as 11:38am but the alert shows the incorrect time.", "attachment": [ { "id": "44434", "filename": "wrongtime.png", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-06T06:10:17.000+0000", "size": 66128, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS:Picker: getValue method for picker returns incorrect time", "creator": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Tested Environment:\r\n\r\nAppcelerator Studio: 3.2.0.201312042306\r\nSDK:3.2.0.v20131205165947\r\nalloy: 1.3.0-beta\r\nacs: 1.0.9\r\nnpm: 1.3.2\r\ntitanium: 3.2.0-beta\t\r\ntitanium-code-processor: 1.1.0-beta\r\nXcode:5.0.2\r\nOS: Mac OSX 10.9\r\nDevice: iphone5(V7.0.4),Google Nexus7(v4.3)", "comment": { "comments": [ { "id": "282913", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Invalid ticket.\n\nPicker time always returns value in GMT . The values should be converted to locale values.\n\nUpdated test code \n\n{code}\nvar win = Ti.UI.createWindow({backgroundColor:'white'});\n \nvar picker = Ti.UI.createPicker({\n\ttype : Ti.UI.PICKER_TYPE_DATE_AND_TIME,\n\tselectionIndicator : true,\n});\n\n\nvar showDate = Ti.UI.createButton({\n\ttitle : 'show date',\n\tbottom : 20\n});\nshowDate.addEventListener('click', function(e) {\n\talert(picker.getValue().toLocaleString());\n});\n \nvar view = Ti.UI.createView({\n\twidth : Ti.UI.FILL,\n\theight : Ti.UI.FILL\n});\nview.add(picker);\nview.add(showDate);\n \nwin.add(view);\n \nwin.open();\n{code}\n\nessentially do `alert(picker.getValue().toLocaleString());` \n\nMarking ticket as invalid", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-06T18:31:33.000+0000", "updated": "2013-12-06T18:31:33.000+0000" }, { "id": "283791", "author": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested Environment:\r\n\r\nAppcelerator Studio: 3.2.0.201312101708\r\nSDK:3.2.0.v20131210191510\r\nalloy: 1.3.0-cr\r\nacs: 1.0.10\r\nnpm: 1.3.2\r\ntitanium: 3.2.0-cr\r\ntitanium-code-processor: 1.1.0-cr\r\nXcode:5.0.2\r\nOS: Mac OSX 10.9\r\nDevice: iPhone Simulator(v7.0.3)\r\n\r\nWorking fine. \r\nUsed the above mentioned code to verify.\r\n\r\nHence closing the issue", "updateAuthor": { "name": "pagarwal", "key": "pagarwal", "displayName": "Priya Agarwal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-11T10:36:15.000+0000", "updated": "2013-12-11T10:36:15.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }