|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[1999-10-01 00:38 UTC] signal11 at mediaone dot net
<?php
$mod_time=date("D M d, Y",filectime("/home/httpd/html/" . $PHP_SELF));
echo "<FONT COLOR=\"#BBBBBB\">Last modified: $mod_time</FONT>\n";
?>
Above is the offending code. When passed the below file, it prints:
Last modified: Wed Dec 31, 1969"
-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 "date"
Thu Sep 30 23:37:38 CDT 1999
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 18 03:00:01 2025 UTC |
If you change the second line to: $mod_time=date("D M d H:i:s, Y",filectime("/home/httpd/html/" . $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.