Java tutorial
//package com.java2s; import java.util.Date; public class Main { /** * get timestamp * @return */ public static String getTimeStamp() { return String.valueOf(new Date().getTime() / 1000).substring(0, 10); } }