This is almost certainly a time zone problem. The Java method uses / expects GMT, the OS will display local time, which explains the difference. Now the real question is: how is time stored in the file system?
What file system are you using? Probably FAT32, which stores timestamps in local time, which makes it difficult to coordinate them between the OS. I'm not sure where exactly everything goes wrong, but it could be an OS configuration problem or a JVM error - which JVM do you use on Linux?
source share