代码
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date=new Date();
Calendar calendar = ();
(date);
calendar.add(Calendar.DAY_OF_MONTH, -1);
date = ();
(sdf.format(date));
同样的,如果要获取后一天的当前时间 +1