date

long lon = newFile.lastModified();

String date = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(new Date(lon));

System.out.println("====lon===="+date);

newFile.setLastModified(System.currentTimeMillis());

String dateEnd = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(new Date(newFile.lastModified()));

System.out.println("====newFile.lastModified()===="+dateEnd);

你可能感兴趣的:(Date)