Fix date time format for Android client

According to Android's docs (https://developer.android.com/reference/java/text/SimpleDateFormat.html)
the `SimpleDateFormat` class in Android does not accept `XXX` as the timezone, it uses `Z` instead.

Also updated the date time format of Android and Java clients to include milliseconds.
This commit is contained in:
xhh
2015-04-01 10:15:34 +08:00
parent 6ac497d774
commit d5ad4c4ae7
4 changed files with 4 additions and 4 deletions

View File

@@ -70,7 +70,7 @@ public class ApiInvoker {
* ISO 8601 date time format.
* @see https://en.wikipedia.org/wiki/ISO_8601
*/
public static final SimpleDateFormat DATE_TIME_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX");
public static final SimpleDateFormat DATE_TIME_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
/**
* ISO 8601 date format.