获取本机当前时间 和对时间的加减处理时间:2021-08-27 22:12:00Calendar calendar=Calendar.getInstance(); Date nowTime=calendar.getTime(); System.out.println(nowTime); calendar.add(Calendar.HOUR, 10); //减填负数 nowTime=calendar.getTime(); System.out.println(nowTime);