获取当前时间前一秒时间
new Date(System.currentTimeMillis()-1000);可以打印出来看看
SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //格式时间
Timestamp nowTime1=Timestamp.valueOf(df.format(new Date(System.currentTimeMillis())));
Timestamp nowTime2=Timestamp.valueOf(df.format(new Date(System.currentTimeMillis()+1000)));