4

Whenever I change a file on my (Scientific Linux 6, 64bit) machine, its modification date is set in the future:

bash$ touch new.txt && stat -c %y new.txt && date
2016-09-19 12:33:08.763882267 +0200
Mo 19. Sep 12:30:21 CEST 2016

How can this possibly happen and how can I make the modification dates sane again? It seems as if the difference between the actual time and the modification time is increasing the longer the machine is active.

  • 1
    Are the files stored on a network share? If so you're seeing the difference in clock sync between the client and server. – chicks Sep 19 '16 at 18:48
  • You are right. The mount is of a network share. Testing on a local mount, the time stamps agree with one another; so the other machine's clock is not synced up. I didn't think of this ... Thanks a lot! – Zollern Sep 19 '16 at 22:23
1

As confirmed in comments above, you are working with a networked filesystem where the server and client times are not synced. The file is created with a timestamp provided by the server and so it is 3 minutes in the future from the perspective of your workstation. This is easily avoidable if you're running NTP or some other time synchronization system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.