|
Posted by "Richard Lynch" on 10/21/61 11:31
On Sun, November 6, 2005 7:37 am, David T. Kotchen wrote:
> 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.
As I understand it, Windows filemtime resolution is only one MINUTE
instead of one SECOND. You'd have to ask Bill why, and what the extra
bits are being used for if you want to understand why they aren't what
you think they should be.
Or maybe the PHP-Windows list would know.
--
Like Music?
http://l-i-e.com/artists.htm
Navigation:
[Reply to this message]
|