I save a Entitiy with a new() date in java.util.Date type, on Google DataStore, and then I got it to the Android Client, and I get it in this format:
yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
example: '2015-12-27T09:49:51.013Z'
I save the date on shared preferences in Android client in string with this method:
.getDate().toStringRfc3339()
Then later, when I need send it to the server, I try to set the date of the entity in this way:
.setDate(stringDateInServerFormatToDate(date));
public com.google.api.client.util.DateTime stringDateInServerFormatToDate(String dateInServerFormat){
googleDate = new com.google.api.client.util.DateTime(dateInServerFormat);
return googleDate;
}
And that works, but when I try put it on the server by Endpoints, I get this error:
"message": "com.google.appengine.repackaged.org.codehaus.jackson.map.JsonMappingException: Can not construct instance of int from String value '2015-12-27T09:49:51.013Z': not a valid Integer value\n at [Source: N/A; line: -1, column: -1] (through reference chain: com.imaginamos.caapturesupervisor.backend.Entities.User[\"userUpdate\"])"
I have tried many fromas and have not been successful. How can I fix this?