Reply to Re: [PHP] filemtime doesn't always copy correctly

Your name:

Reply:


Posted by "Richard Lynch" on 10/20/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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация