I am using JodaTime to create ISO 8601 String.
DateTime jodatime = new DateTime(2016, 04, 05, 23, 59, 59, 999, DateTimeZone.UTC);
String converted = jodatime.toDateTimeISO().toString();
Right now, I am getting the following:
2016-04-06T06:59:59.999Z
However, I want to truncate/remove seconds and milliseconds.
2016-04-05T23:59Z
Does anyone know how to do this with the least hacky way? And can anyone tell me if that shortened version of ISO8601 can be recognized by date parsing libraries?