为什么以下代码中文件的日期没有改变?
fLocal.location
= C:\ 中的现有文件
fLocal.date
= 以 Long 形式设置的日期
boolean x = new File(fLocal.location).setLastModified(Long.parseLong(fLocal.date));
System.out.println("Changed: " + x);
System.out.println(new Date(new File(fLocal.location).lastModified()));
System.out.println(new Date(Long.parseLong(fLocal.date)));
输出:
Changed: false
Fri Feb 15 23:02:51 CET 2013
Fri Feb 15 22:49:34 CET 2013