Android examples for java.util:Timezone
Format date to string in yyyy-MM-dd'T'HH:mm:ss ISO8601 format Without Zone String
import android.util.Log; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Locale; import java.util.TimeZone; public class Main{ private static final DateFormat ISO8601_DATE_FORMATTER_TYPEII_WITHOUT_ZONE = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss"); public static final String getISO8601DateWithoutZoneString(Date date) { return ISO8601_DATE_FORMATTER_TYPEII_WITHOUT_ZONE.format(date); }/* w ww. j ava 2 s . com*/ }