Here you can find the source of getCurrentTimestampAsISOString()
public static String getCurrentTimestampAsISOString()
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final SimpleDateFormat TIMESTAMP_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); public static String getCurrentTimestampAsISOString() { return getDateAsISOTimestampString(new Date()); }//from w ww .j a v a 2 s . co m public static String getDateAsISOTimestampString(Date timestamp) { return TIMESTAMP_FORMAT.format(timestamp); } }