Here you can find the source of getMiniTime()
public static Date getMiniTime()
//package com.java2s; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date getMiniTime() { try {//from w w w. ja va 2 s.c o m return stringToTime("yyyy-MM-dd HH:mm:ss", "1900-01-01 00:00:00"); } catch (Exception ex) { return new Date(0); } } public static Date stringToTime(String format, String sDate) throws Exception { DateFormat df = new SimpleDateFormat(format); Date _date = df.parse(sDate); if (timeToString(format, _date).equals(sDate)) { return _date; } else { throw new Exception(sDate + " is error"); } } public static String timeToString(String format, Date date) { DateFormat df = new SimpleDateFormat(format); return df.format(date); } }