Here you can find the source of isoDateFormat(Calendar calendar)
public static String isoDateFormat(Calendar calendar)
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.*; public class Main { public static String isoDateFormat(Calendar calendar) { TimeZone tz = TimeZone.getTimeZone("UTC"); DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'"); df.setTimeZone(tz);//from ww w .java 2 s. c o m return df.format(calendar.getTime()); } }