Here you can find the source of createTimestampedZipFilename(String prefix)
public static String createTimestampedZipFilename(String prefix)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private final static ThreadLocal<SimpleDateFormat> DATE_FORMATTER = new ThreadLocal<SimpleDateFormat>() { @Override// w ww .java2 s . c o m protected SimpleDateFormat initialValue() { return new SimpleDateFormat("yyyyMMddHHmmss"); } }; public static String createTimestampedZipFilename(String prefix) { StringBuilder sb = new StringBuilder(prefix); sb.append("-"); sb.append(DATE_FORMATTER.get().format(new Date())); sb.append(".zip"); return sb.toString(); } }