I have an object --> public timestamp date;
which gives me a date like :
2012-08-07T07:47:46 - 0000+0....
but I want:
"2012-08-07T07:47:46Z"
How can I parse to json date iso 8601 with the "z" at the end?
I have an object --> public timestamp date;
which gives me a date like :
2012-08-07T07:47:46 - 0000+0....
but I want:
"2012-08-07T07:47:46Z"
How can I parse to json date iso 8601 with the "z" at the end?
You should look into Joda libraries, what you need is to convert ISO8061 to ISO8061 but with UTC timezone. Joda Docs
Alternatively DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'")