protected static String fromTime ( final long time ) { Date date = new Date ( time ) ; // Waiting for Java 7: SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX"); String formatted = new SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ssZ" ) . format ( date ) ; return formatted . substring ( 0 , 22 ) + ":" + formatted . substring ( 22 ) ; }
Transform time into ISO 8601 string .