{"action":"closed","issue":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2214","repository_url":"https://api.github.com/repos/ParsePlatform/parse-server","labels_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2214/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2214/comments","events_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2214/events","html_url":"https://github.com/ParsePlatform/parse-server/issues/2214","id":164027718,"number":2214,"title":"Date objects in cloud functions are not same as hosted parse","user":{"login":"codebreach","id":501516,"avatar_url":"https://avatars.githubusercontent.com/u/501516?v=3","gravatar_id":"","url":"https://api.github.com/users/codebreach","html_url":"https://github.com/codebreach","followers_url":"https://api.github.com/users/codebreach/followers","following_url":"https://api.github.com/users/codebreach/following{/other_user}","gists_url":"https://api.github.com/users/codebreach/gists{/gist_id}","starred_url":"https://api.github.com/users/codebreach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codebreach/subscriptions","organizations_url":"https://api.github.com/users/codebreach/orgs","repos_url":"https://api.github.com/users/codebreach/repos","events_url":"https://api.github.com/users/codebreach/events{/privacy}","received_events_url":"https://api.github.com/users/codebreach/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ParsePlatform/parse-server/labels/pr-submitted","name":"pr-submitted","color":"207de5"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-06T08:48:42Z","updated_at":"2016-07-19T06:14:32Z","closed_at":"2016-07-19T06:14:32Z","body":"I am calling a cloud function with parameters `{date: new Date()}`.\r\n\r\nThis is sent over the wire as:\r\n```es6\r\n{\r\n  date: {\r\n    __type: 'Date',\r\n    iso: '1997-07-16T19:20:30+01:00'\r\n  }\r\n}\r\n```\r\n\r\nIn the hosted parse function, the date object is untouched\r\n```es6\r\nParse.Cloud.define('dateF', (request, response) => {\r\n  console.log(request.params.date.iso);\r\n  // Prints ISO date string\r\n});\r\n```\r\n\r\nIn parse-server the date object gets flattned to just the date string:\r\n```es6\r\nParse.Cloud.define('dateF', (request, response) => {\r\n  console.log(request.params.date);\r\n  // Prints ISO date string\r\n  // Date is now a string not an object\r\n  console.log(request.params.date.iso);\r\n  // ^ does not work\r\n});\r\n```\r\n\r\n### Environment Setup\r\n\r\n- **Server**\r\n  - parse-server version: 2.2.15\r\n  - Operating System:     Mac OS X\r\n  - Hardware:             MBP\r\n  - Localhost or remote server? Localhost\r\n\r\n- **Database**\r\n  - MongoDB version: 3.2.1\r\n  - Storage engine:  Default\r\n  - Hardware:        MBP\r\n  - Localhost or remote server? Localhost\r\n"}}
{"actor":{"display_login":"drew-gross"}}