I get a date string parsing exception while Parse iOS SDK tries to convert createdAt and updatedAt fields to NSDate when parse object is sent as response from Cloud code method. These dates must be represented in "2015-09-14T15:18:01.521Z" format, but they are returned from cloud code in "2015-09-14 15:18:03 +0000" format. Parse iOS SDK can't parse them and throws exception. How can I solve this problem?
CloudCode:
Parse.Cloud.define("defineFollowers", function(request, response) {
var query = new Parse.Query(Parse.User);
query.equalTo("name", "Test");
query.find({
success: function(persons) {
response.success(persons);
}
});
});
Code on client:
[PFCloud callFunctionInBackground:@"defineFollowers"
withParameters:@{}
block:^(NSArray *results, NSError *error) {
if (!error) {
// do something
}
}];