<phpbug>
  <id>2415</id>
  <bug_type>Misbehaving function</bug_type>
  <email>signal11@mediaone.net</email>
  <sdesc>filectime reports wrong time after Sep 1999.  Possible overflow</sdesc>
  <ldesc>&lt;?php
        $mod_time=date(&quot;D M d, Y&quot;,filectime(&quot;/home/httpd/html/&quot; . $PHP_SELF));
        echo &quot;&lt;FONT COLOR=\&quot;#BBBBBB\&quot;&gt;Last modified: $mod_time&lt;/FONT&gt;\n&quot;;
?&gt;
Above is the offending code.  When passed the below file, it prints:
Last modified: Wed Dec 31, 1969&quot;

-rw-r--r--   1 bojay   users        1954 Sep 30 23:22 index.php3

Changing the filesize or timestamp past about Sep 29 doesn't seem to do anything - it's permanently locked at Dec 31, 1969.  It's anybody's guess why.. but I suspect somebody didn't allocate enough bytes for the epoch value (If memory serves, it's an unsigned long double) and now it's bit them in the ass. :\

Just so you are sure it isn't my system:

23:37:32
vortex:~$ ssh bofh &quot;date&quot;
Thu Sep 30 23:37:38 CDT 1999


</ldesc>
  <php_version>3.0.9</php_version>
  <php_os>Linux/Redhat 6.0</php_os>
  <status>Closed</status>
  <ts_submitted>1999-10-01 00:38:21</ts_submitted>
  <ts_modified>1999-10-02 21:55:54</ts_modified>
  <assign>jah</assign>
  <submitted>938738301</submitted>
  <modified>938901354</modified>
  <votes>0</votes>
  <reproduced></reproduced>
  <tried></tried>
  <sameos></sameos>
  <samever></samever>
  <average></average>
  <deviation></deviation>
  <comment>
    <email>jah@cvs.php.net</email>
    <comment>If you change the second line to:
$mod_time=date(&quot;D M d H:i:s, Y&quot;,filectime(&quot;/home/httpd/html/&quot; . $PHP_SELF));
the result should be 'Last modified: Wed Dec 31 18:00:00, 1969', which is
mysteriously 6 six hours before the epoch, just like your timezone is 6 hours
off from GMT.

What's happening here is that for some reason, filectime() can't stat your file
and returns false, which in this context is 0 (the epoch).

Check that the directory path is really right and try 'echo $PHP_SELF' too,
and check your server logs for errors. The problem is somewhere else than
in PHP.</comment>
    <added>938901200</added>
  </comment>
  <comment>
    <email>jah@cvs.php.net</email>
    <comment>Forgot to close...</comment>
    <added>938901354</added>
  </comment>
</phpbug>
