Java tutorial
import java.util.Date; import org.apache.commons.lang.time.DateFormatUtils; public class Main { public static void main(String[] argv) throws Exception { Date today = new Date(); String timestamp = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format(today); System.out.println("timestamp = " + timestamp); } }