{ "id": "62232", "key": "TIMOB-1600", "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": [ { "id": "11227", "name": "Release 1.5.0 M02", "archived": true, "released": true, "releaseDate": "2010-11-22" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:56:38.000+0000", "created": "2011-04-15T02:57:04.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "date", "defect", "json.stringify" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:56:38.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

Here is the output of JSON.stringify on a number of different\nplatforms, including Android. As you can see, the Android version\nhandles both a date directly incorrectly, and embedded in an object\nincorrectly, but differently.

\n

This bug makes it very difficult to send date information to\nservers or store it in local state.

\n

Firefox:
\nJSON.stringify(new Date()) => \"2010-08-19T09:12:00.027Z\"\nJSON.stringify({time: new Date()}) =>\n{\"time\":\"2010-08-19T09:13:30.025Z\"}

\n

Chrome:
\nJSON.stringify(new Date()) => \"2010-08-19T09:14:16.527Z\"\nJSON.stringify({time: new Date()}) =>\n{\"time\":\"2010-08-19T09:14:55.028Z\"}

\n

Titanium iPhone:
\nJSON.stringify(new Date()) => \"2010-08-19T09:21:22.528Z\"\nJSON.stringify({time: new Date()}) =>\n{\"time\":\"2010-08-19T09:21:22.528Z\"}

\n

Titanium Android:
\nJSON.stringify(new Date()) => \"Thu Aug 19 10:19:00\nEurope/London 2010\" JSON.stringify({time: new Date()}) =>\n{}

{html}", "attachment": [], "flagged": false, "summary": "Android: JSON.stringify incorrectly handles dates including silently faiing", "creator": { "name": "lukaso", "key": "lukaso", "displayName": "lukaso", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "lukaso", "key": "lukaso", "displayName": "lukaso", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "126165", "author": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [c680f8c261118315c9160a96ce05bcbc08eda14f])\ncompensate for JS timezone offsets in date conversion (Java Dates\nare GMT), use the same JSON format used by browsers for JSON\nstringifying Dates. added a test for dates and JSON [#1600\nstate:fixed-in-qa milestone:\"Release 1.5.0 M02\"] \nhttps://github.com/appcelerator/titanium_mobile/commit/c680f8c26111...

{html}", "updateAuthor": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:57:05.000+0000", "updated": "2011-04-15T02:57:05.000+0000" }, { "id": "126166", "author": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Passed Android Version 1.6 Sim, Titanium SDK version: 1.5.0\n(11/24/10 12:05 c0aff27)
\nPassed Android Versions 2.1 Sim, Titanium SDK version: 1.5.0\n(11/24/10 12:05 c0aff27)

{html}", "updateAuthor": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:57:05.000+0000", "updated": "2011-04-15T02:57:05.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }