java 1.7
Files.write(path,list,StandardCharsets.UTF_8,StandardOpenOption.APPEND);
String preTime = Files.readAllLines(path).get(0); LocalDate date1 = LocalDate.parse(preTime,DateTimeFormatter.BASIC_ISO_DATE); //如果时间记录存在,取出上一次操作时间+1天 date = date1.plusDays(1);