I’m having a problem where when I edit a file, it’s modified timestamp is set to a time in the future
Illustration of the problem:
$ make
make: Nothing to be done for `all'.
$ touch makefile
$ make
make: Warning: File `makefile' has modification time 19 s in the future
make: Nothing to be done for `all'.
make: warning: Clock skew detected. Your build may be incomplete.
If I edit the file that same thing happens (ie: this is not a problem unique to touch)
More details:
$ date
Thu Jan 24 20:18:19 EST 2013
$ ls -l
total 24
-rw-rw-r--. 1 steve steve 13907 Jan 24 20:18 makefile
-rw-rw-r--. 1 steve steve 23 Jan 24 19:54 modules.mk
drwxrwxr-x. 3 steve steve 4096 Jan 24 19:54 test
$ touch makefile
$ ls -l
total 24
-rw-rw-r--. 1 steve steve 13907 Jan 24 2013 makefile <-- in the future!
-rw-rw-r--. 1 steve steve 23 Jan 24 19:54 modules.mk
drwxrwxr-x. 3 steve steve 4096 Jan 24 19:54 test
$ ls -l
total 24
-rw-rw-r--. 1 steve steve 13907 Jan 24 20:18 makefile
-rw-rw-r--. 1 steve steve 23 Jan 24 19:54 modules.mk
drwxrwxr-x. 3 steve steve 4096 Jan 24 19:54 test
$ date
Thu Jan 24 20:18:48 EST 2013
How can I edit the file and have it’s modified time set to now?
I had the same problem a long time ago using NFS. It drove me crazy! The host where the files were stored and my own computer where not syncronized in time. I had to request the system managers to install NTP.