Here you can find the source of getCurrentISO8601Date()
public static String getCurrentISO8601Date()
//package com.java2s; //License from project: Creative Commons License import java.text.DateFormat; import java.util.Date; public class Main { private static DateFormat df; public static String getCurrentISO8601Date() { String now = df.format(new Date()); return now; }/*from w w w. j a va2 s .c om*/ }