I am backing up a file (the path & filename of which are stored in $original;
the path & filename of the copy are stored in $bkup). I would also like to
copy the file modification time of $original, so, after copying the file
itself, I use:
touch($bkup, filemtime($original));
However, after I use the above "touch" function, filemtime($original) and
filemtime($bkup) are often slightly different. For example, I might have:
echo filemtime($original); // gives 1126191599
echo filemtime($bkup); // gives 1126191600
Why the small difference?
(I'd like these two file modification times to be exactly the same because I
want to compare file modification times when I do incremental backups, and
copy a file only if the file modification times are different.)
By the way, if it helps, I am using Windows XP.
Thanks!