(总结)获取明日的时间戳-BeanShell PreProcessor前置处理器
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
/*
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
cal.add(Calendar.DATE, 1);
vars.put("orderDate",cal.getTime().getTime().toString());
*/
try{
Date date =new Date(); //获取当前时间
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
String nowDate = sf.format(date);
Calendar cal = Calendar.getInstance();
cal.setTime(sf.parse(nowDate));
cal.add(Calendar.DAY_OF_YEAR,+1); //加一天,变为后一天
vars.put("tomorrow",cal.getTime().getTime().toString());
}
catch(Exception e){
//异常时消息
}