Calendar calendar = Calendar.getInstance(); 
		calendar.setTime(new Date()); 
		calendar.set(Calendar.HOUR, 
				calendar.get(Calendar.HOUR) - 1);// 让日期加1 
		System.out.println(calendar.get(Calendar.DATE));// 加1之后的日期Top 
		System.out.println(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SS").format(calendar.getTime())); 
评论关闭
IT源码网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!