PHP 4.0 Bug #9993: Wrong File Created Date and Wrong Filesize
| From: | lopes at noite dot pt | Date: | Mon, 26 Mar 2001 13:40:43 +0000 |
| Subject: | PHP 4.0 Bug #9993: Wrong File Created Date and Wrong Filesize | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-49958@lists.php.net to get a copy of this message | ||
From: lopes@noite.pt
Operating system: WINNT
PHP version: 4.0.4
PHP Bug Type: *Directory/Filesystem functions
Bug description: Wrong File Created Date and Wrong Filesize
I have already send a previus bug report.
ID: 9921.
The Source is :
<?php
$fhandle = opendir(".");
while (false!=($file = readdir($fhandle)))
{
if ($file != "." && $file != "..")
{
if (!(is_dir($file)))
{
$fdata = filemtime($file);
$fdata = date("d/m/Y",$fdata);
$fsize = filesize($file);
printf("%s %s %dn", $file, $fdata, $fsize);
}
clearstatcache();
closedir($fhandle);
}
}
?>
The Output for every file (no matter filesize or file date) is :
<filename> 01/01/1970 0
---------------------
I think i has something to do with the Y2K bug.
Perl had the same bug.
--
Edit Bug report at: http://bugs.php.net/?id=9993&edit=1