Here you can find the source of formatTimestampForFilename(final long timestamp)
public static String formatTimestampForFilename(final long timestamp)
//package com.java2s; //License from project: Apache License public class Main { public static String formatTimestampForFilename(final long timestamp) { return String.format("%1$tF_%1$tH-%1$tM-%1$tS", timestamp); }// w ww .j ava 2 s .c o m }