Here you can find the source of getSecondTime()
public static String getSecondTime()
//package com.java2s; //License from project: Open Source License public class Main { public static String getSecondTime() { return String.valueOf(System.currentTimeMillis()).substring(0, 10); }/*w w w .jav a 2 s . co m*/ }