Why is the file date in the following code not changed?
fLocal.location = Existing file in C: \
fLocal.date = Date to set to 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)));
Output:
Changed: false Fri Feb 15 23:02:51 CET 2013 Fri Feb 15 22:49:34 CET 2013
source share