// 晚上23点至第二天8点之间不发个推消息
Calendar cal = Calendar.getInstance();
cal.setTime(new Date());
Date beginTime = new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss”).parse(DateFormatUtils.format(cal.getTime(), “yyyy-MM-dd 23:00:00”));
cal.add(Calendar.DAY_OF_YEAR, 1);
Date endTime = new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss”).parse(DateFormatUtils.format(cal.getTime(), “yyyy-MM-dd 08:00:00”));