简洁方法(时间戳/1000存储)
@Test
public void timestamp() throws Exception {
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
long firstdate = sf.parse("1991-01-01 00:00:00").getTime()/1000;
long lastdate = sf.parse("1991-12-31 00:00:00").getTime()/1000;
String d1 = sf.format(firstdate);
String d2 = sf.format(lastdate);
System.out.println(d1+" = "+firstdate);
System.out.println(d2+" = "+lastdate);
}