ID: 24213
Updated by: [EMAIL PROTECTED]
Reported By: mf22cs at student dot hik dot se
-Status: Open
+Status: Feedback
Bug Type: Date/time related
Operating System: WinXP Pro and Linux/Slack 2.4.18
PHP Version: 4.3.2
New Comment:
Works just fine with Linux here using latest CVS.
Are you using ZTS (threaded php) on linux?
Previous Comments:
------------------------------------------------------------------------
[2003-06-16 18:32:28] mf22cs at student dot hik dot se
Description:
------------
getlastmod() gives the correct result on my localhost (which is at
WinXP running IIS 5.1 with PHP4.3.2). But on the Linux webserver
(running Apache 1.3.27 and PHP4.3.1) it gives a totally wrond result
(that seems to be the last accesstime).
Then I tried the filemtime(string) instead, but then my localhost got
all crazy. It showed the birthdate of UNIX instead.
Reproduce code:
---------------
GLM: <?php
echo date("d-m-Y H:i:s",getlastmod());
?>
<br/>FMT: <?php
echo date("d-m-Y
H:i:s",filemtime(trim($_SERVER["SCRIPT_FILENAME"])));
?>
Expected result:
----------------
GLM: 17-06-2003 01:20:55
FMT: 17-06-2003 01:20:55
at both systems (if that is the correct date/time of modification).
Actual result:
--------------
At the server this gives the following result:
GLM: 17-06-2003 01:11:35
FMT:17-06-2003 01:18:23
And at local host:
GLM: 17-06-2003 01:18:21
FMT:01-01-1970 01:00:00
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24213&edit=1