#35125 [Bgs]: "touch" often gives incorrect file modification time
| From: | sniper@php.net | Date: | Sun, 06 Nov 2005 14:41:07 +0000 |
| Subject: | #35125 [Bgs]: "touch" often gives incorrect file modification time | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-87685@lists.php.net to get a copy of this message | ||
ID: 35125
Updated by: sniper@php.net
Reported By: dmceo415 at yahoo dot com
Status: Bogus
Bug Type: Filesystem function related
Operating System: Windows XP
PHP Version: 5.0.5
New Comment:
Also note that filemtime() result is cached. (RTFM)
Previous Comments:
------------------------------------------------------------------------
[2005-11-06 15:39:21] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
We only attach to the libc function. If windows misbehaves -> not our
problem, report to Microsoft.
------------------------------------------------------------------------
[2005-11-06 15:08:29] dmceo415 at yahoo dot com
Description:
------------
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
The "touch" function seems to be giving a slightly incorrect file
modification time.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35125&edit=1