#35125 [NEW]: "touch" often gives incorrect file modification time
| From: | dmceo415 at yahoo dot com | Date: | Sun, 06 Nov 2005 14:08:29 +0000 |
| Subject: | #35125 [NEW]: "touch" often gives incorrect file modification time | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-87679@lists.php.net to get a copy of this message | ||
From: dmceo415 at yahoo dot com
Operating system: Windows XP
PHP version: 5.0.5
PHP Bug Type: Filesystem function related
Bug description: "touch" often gives incorrect file modification time
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 bug report at http://bugs.php.net/?id=35125&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35125&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35125&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35125&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35125&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35125&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35125&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35125&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35125&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35125&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35125&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35125&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35125&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35125&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35125&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35125&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35125&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35125&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35125&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35125&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35125&r=mysqlcfg