使用Calendar类 //指定获取需要获取的时间点 Calendar calendar = Calendar.getInstance(); calendar.setTime(new Date()); // 将时分秒,毫